search

Home  >  Q&A  >  body text

git仓库太大

本地创建的仓库,多次提交后,发现好大object目录有100M,请问怎么清理

高洛峰高洛峰2823 days ago675

reply all(2)I'll reply

  • 世界只因有你

    世界只因有你2017-05-02 09:24:02

    Git will not submit all the files every time, so the first submission of 100M is just a little slower, so you don’t have to worry about problems in later development.

    reply
    0
  • 为情所困

    为情所困2017-05-02 09:24:02

    If a large file is submitted by mistake
    1 Use the git filter-branch command to completely delete it from the history
    2 Add to .gitignore
    3 git push -force to overwrite the contents of the remote
    4 Notify other developers to ferch and checkout to the new branch

    Be careful when modifying remote history, and confirm carefully before pushing.

    reply
    0
  • Cancelreply