How can I push all branches from a Git bundle I received?

52 Views Asked by At

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 [email protected]: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  [email protected]:username/myrepo1.git (fetch)
origin  [email protected]: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 '[email protected]:username/myrepo1.git'

How can I push them all?

0

There are 0 best solutions below