# Unable to push remote branches

2 messages from 2011-05-06 to 2011-05-06. Participants: Srinidhi K V, Carlos Martín Nieto.
Thread: https://gitlist.dev/t/27278

## Srinidhi K V, 2011-05-06 04:47

Subject: Unable to push remote branches
Message-ID: <BANLkTimd887k0D=OL9rSuq6Z3FkhNAFAbQ@mail.gmail.com>
URL: https://gitlist.dev/e/BANLkTimd887k0D%3DOL9rSuq6Z3FkhNAFAbQ%40mail.gmail.com

```
Hi All,

I have a GIT repository in which there are lot of remote branches, I
have created a bare git repository in my server. When I push my local
repository to the bare repository in server using "git push --all"
only local branches get pushed.
However when I use "git branch -r" I get remote branches which tracks
to local branch.
I need push all the existing remote branches from my local repo to
bare repository in my server. How do i do that? Any pointer would be
of great help.

Thanks in Advance
Srinidhi KV

```

## Carlos Martín Nieto, 2011-05-06 08:30

Subject: Re: Unable to push remote branches
Message-ID: <20110506083003.GA6866@bee.lab.cmartin.tk>
URL: https://gitlist.dev/e/20110506083003.GA6866%40bee.lab.cmartin.tk
In-Reply-To: <BANLkTimd887k0D=OL9rSuq6Z3FkhNAFAbQ@mail.gmail.com>

```
On Fri, May 06, 2011 at 10:17:37AM +0530, Srinidhi K V wrote:
> Hi All,
> 
> I have a GIT repository in which there are lot of remote branches, I
> have created a bare git repository in my server. When I push my local
> repository to the bare repository in server using "git push --all"
> only local branches get pushed.

This is exactly what the man page says --all does. Remote branches are
under refs/remotes/<remote>/heads. You might want to use --mirror or
specify refs/remotes/* as the branches to push (I haven't tested this
refspec, but I think it should work).

   cmn

```
