Detele the ‘ghost’ branch reference to prevent wrong git tab-completion

If you deleted a branch, even on all the remotes, but your git tab-completion still gives you the ghost branch, try to delete that branch reference by yourself, it may be in .git/packed-refs and .git/info/refs, in these two files, each reference will use one line, just delete the ghost branch here and git tab-completion will be good again!

Convert a shallow cloned/pulled git repository to a normal one

Shallow clone/pull is very useful to speed up the clone process and save disk space and our time, but sometimes we may want to make a repository un-shallow in future. Re-clone/pull it all is not a good idea, in fact, git provides unshallow parameter since version 1.8.2.1

--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 as much as possible so that the current repository has the same history as the source repository.

https://git-scm.com/docs/git-fetch/

So next time, try git fetch --unshallow to make the repo be a normal, unshallow one, don’t just re-clone/pull.