views:

55

answers:

3

I've tried git branch -r, but that only lists remote branches that I've tracked locally. How do I find the list of those that I haven't? (It doesn't matter to me whether the command lists all remote branches or only those that are untracked.)

+2  A: 

try

 git branch -at
Jed Schneider
The `-t` option affects behavior when *creating* branches. Nothing to do with this.
Jefromi
+1  A: 
git branch -a | grep remotes/*
Idan K
This is basically equivalent to `git branch -r`, which the OP said wasn't good enough.
Jefromi
actually both `git branch -a` and `git branch -r` list all remote branches for me, I'm not sure if what the OP said is true. I just setup a test repository and verified this (only had master tracking origin/master but still saw all remote branches with both flags).
Idan K
+4  A: 
git ls-remote <remote-name>
Dustin
You could grep the output for refs/heads to avoid seeing all the tags, which are likely the same ones you have.
Jefromi