Pushing to github after a shallow clone

前端 未结 5 929
春和景丽
春和景丽 2020-12-02 23:56

I had a massive git repo because of a huge number of commits, so following advice here I created a shallow clone. I\'ve made changes to this new local repo, and now I want t

5条回答
  •  生来不讨喜
    2020-12-03 00:35

    If you are working in a shallow clone and the lack of history is causing a problem, you can fetch more history with the --depth option.

    git fetch --depth=20
    

    Where 20 is is the amount of commits to fetch. Increase it if that is not enough.

    You can also use the --depth option with git pull.

提交回复
热议问题