I am having great success with git push --mirror to make backup copies to a bare repo. But after search on SO and elsewhere, I cannot find a way to clone the thing locally with all branches. I do not want to use git clone since I don’t want my local repo to know about the bare repo. If I use git pull it only brings down the HEAD branch.
Guessing:
git pull /data/Dropbox/backup/that_stuff.git *
gets me nowhere, of course.
How do I get the entire repo with all branches back again? I realize I could probably just copy the bare repo to my .git directory, but that seems like a bad idea.
Try
git fetchinstead ofgit pullSince
git pullis there to fetch a branch and merge it to a local branch, it wouldn’t make alot of sense trying to merge all remote branches to a local branches.The above command copies all branches from the remote
refs/heads/namespace and stores them to the localrefs/remotes/remoteRpo/namespace, unless thebranch.<name>.fetchoption is used to specify a non-default refspec..Try:
could force fetching all heads for all branches.
See this SO question.
The OP yar reports:
works.