Thanks a lot for the reply.

@Jeenu: Yeah I have cloned it from my friend who has in turned cloned
from Android repository.
So if I have understood correctly, when I clone git repository if I
receive only local branches but not remote branches present in server
machine then I have not missed out any thing when I cloned?

Also, I was just wondering as
git push origin --tags
git pull origin
clones all the tags , similarly was there any command to get remote branch.

Srinidhi

On Fri, May 6, 2011 at 2:38 PM, Jeenu <gro...@jeenuv.otherinbox.com> wrote:
>
>
> On May 6, 9:49 am, Srinidhi K V <srinidh...@yahoo.co.in> 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.
>> 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.
>
> From what you described, Git probably is doing the right thing. When
> you say your existing repository has lot of remote branches, I suppose
> you either copied your repository from someone, or you added those
> remotes yourself. I don't think you got all of them (except your
> 'origin') when you cloned it, did you?
>
> Technically, remote branches don't belong to your repository. They are
> just references that you use to point to a branch in some one else's
> repository. Also, when you say you've some remote branches, you
> probably are already tracking them with your local branches; so they
> get pushed to your server anyway.
>
> Someone pulling from your repository (to which you just pushed) would
> see local branches that you decided to push. However, what _other_
> remote branches they'd like to add and track is only up to them. In
> other words, IIUC, you can only push local branches. If you want to
> push the remote branches, the right thing to do is to create local
> branches and push them.
>
> git branch -t other_remote/remote_branch my_tracked_branch
> git push origin my_tracked_branch
>
> In any case, if you see the documentation for 'push --all', it says:
>
> --all
>           Instead of naming each ref to push, specifies that all refs
> under refs/heads/ be pushed.
>
> Your remotes don't reside under refs/heads/, but under refs/remotes/.
> What lies under refs/head are your local branches.
>
> HTH.
>
> --
> Jeenu
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/git-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to