Git: interacting with a branch when only one branch is configured for fetching

Confusingly, in certain setups a git repository may be cloned in a “shallow”, meaning you only get history so deep to act upon. You can leverage git fetch –unshallow to remedy that, but when it appears that your local repository doesn’t even see the remote branches/pretends they’re not there try this:

git remote set-branches -add origin yourremotebranchname

Leave a Reply

Your email address will not be published. Required fields are marked *