Search code examples
gitgithubgit-clonegit-fork

How to fork a large repository and contribute to it quickly


I know 2 options of git commands,

  • shallow clone, which is fast forked but unable to push
  • sparse checkout, which is able to commit and push, but not fast enough when initializing

With Github, we can also edit single file contents online. But how about multiple files?

Can someone give a best practice?


Solution

  • I mentioned in 2014 that since Git 1.9, a shallow clone would be able to push back.

    If your initial clone has not enough depth, you can use git fetch --deepen to increase it, until a push succeeds.