Re: "git branch" to list whether it's tracking remote branch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jason,

Am 14.06.2011 12:23 schrieb Jason Timrod:
> Hi,
> 
> please cc me as i am not subscribed to this list.
> 
> is there a command in git that will tell me if a given topic branch in a repository is setup to track a remote branch?
> 
> i think it would be useful so i can see which branches are pointing where when i try and then do a "git push"
> 
> TIA!
> 
> Jason

you could do "git branch -avv" (especially -vv for "very verbose" :-))

---------
  docs   57dddc4 Docs: Reformatted ...
* foo    96afa77 [pub/foo] Ticket 1234 ...
---------

In the second line you can see that local branch "foo" follows "foo" in
the remote "pub".

Or simply "cat .git/config" and check the "branches" sections:

---------
[branch "foo"]
        remote = pub
        merge = refs/heads/foo
---------


HTH,
Dirk
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]