1

I have a GIT repository in which there are 4 local branch and numerous remote branch, I want to push the entire repository to the bare repository (including remote branches). I tried using git push origin, but remote branch did not get pushed.

My config file looks like this

[remote "origin"]
etch = +refs/heads/*:refs/remotes/origin/*
url = git://my-server/local/android/kernel/linux-android.git
pushurl = git@my-server:/local/android/kernel/linux-android.git
push = +refs/heads/*:refs/remotes/origin/*
Pravin
  • 1,059
  • 8
  • 17
Srinidhi
  • 21
  • 3

1 Answers1

0

Remote branches are remote.
You push to them or you fetch from them.
But you don't push remote branches.

A refspec like +refs/heads/*:refs/remotes/origin/* for git push would simply push all the local branches to their respective remote branches with the same name.

If you have other remote branches you want to push to your final upstream repo, you need to checkout those branches locally first, then push them.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250