Pushing to github after a shallow clone

Git (since 1.8.3) now has an official way to fetch the full history of a shallow clone: git fetch –unshallow From the git fetch documentation: –unshallow If the source repository is complete, convert a shallow repository to a complete one, removing all the limitations imposed by shallow repositories. If the source repository is shallow, fetch … Read more

git shallow clone (clone –depth) misses remote branches

After doing a shallow clone, to be able to checkout other branches from remote, Run (thanks @jthill): git remote set-branches origin ‘*’ After that, do a git fetch -v Finally git checkout the-branch-i-ve-been-looking-for Step 1 can also be done manually by editing .git/config. For instance, change the folloing line from: fetch = +refs/heads/master:refs/remotes/origin/master to (replace … Read more