I got a Git bundle (client.bundle
) with several branches that I need to import in my project. I was able to import a single branch by cloning it locally, changing the remote URL and pushing it. However I can't push the other branches.
$ git clone ./client.bundle project1
$ cd project1
$ git remote set-url origin git@my.git:username/myrepo1.git
$ git push -u --all
Branch 'master' set up to track remote branch 'master' from 'origin'.
Now I have:
$ git remote -v
origin git@my.git:username/myrepo1.git (fetch)
origin git@my.git:username/myrepo1.git (push)
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/branch2
remotes/origin/master
remotes/origin/branch3
Note: The last four branches remotes/...
show up in RED!
When I try to push another branch I get an error:
$ git push origin branch3
error: src refspec branch3 does not match any.
error: failed to push some refs to 'git@my.git:username/myrepo1.git'
How can I push them all?