How to view newly added branches on a remote – 126

A few weeks ago I tried to figure out how to do this, but to no avail. I couldn’t find an answer because the solution is a more of a generic “catch-all” command to get lots of info about a remote, including figuring out which branches were newly added to a remote. 

$ git remote show origin

git remote show origin showing saraford-patch-1 as a new remote branch

Note how next to the circled `saraford-patch-1` you see the text `new (next featch will store in remotes/origin). Now I know what new branches (if any) I’ll “fetch down” the next time I do a fetch. 

Obviously this command shows other goodness, like seeing which local branch talks to which remote branch, and more importantly, what “origin” (or some other specified remote) points to.

Thanks to Jeff (blog comments) for the pointer to `git remote show origin` which answered my question!

Leave a comment