git - How do I "undo" a --single-branch clone? -


i cloned repo using the

git clone -b <branch name> --single-branch <github url> <target directory>

this cloned branch, want switch master , other branches. there way besides clearing out , starting on clone rest of repo can undo --single-branch preference?

you can tell git pull branches this:

git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" git fetch origin 

if in .git/config, it'll this:

[core]     repositoryformatversion = 0     filemode = true     bare = false     logallrefupdates = true     ignorecase = true     precomposeunicode = false [remote "origin"]     url = https://github.com/owner/repo.git     fetch = +refs/heads/master:refs/remotes/origin/master [branch "master"]     remote = origin     merge = refs/heads/master     rebase = true 

i compared full clone, , saw difference "fetch" under [remote "origin"].

note: i'm running git version 1.8.2. config options may have changed if you're running older version of git. if commands don't work, i'd recommend looking through .git/config see if can see similar.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -