Personal blog of Gunnari Auvinen. I enjoy writing about software engineering topics.

Picture of the author, Gunnari

Listing All Branches From Remote Git Repositories

January 12, 2015

While working earlier today, I found myself in the position of wanting to obtain a list of all of the branches associated with my projects remote git repositories. I knew that git branch --all would get me all of the branches, local and remote, so I decided to spend a couple of minutes looking at the git branch command documentation. Within the git branch manual page, I found out that both the -r and --remote flags list only the remote-tracking branches. I quit out of the help page and back into the terminal, where I was rewarded with only my remote tracking branches after entering git branch -r into the command line.