Vijay Rana
Vijay Rana

Reputation: 1079

List all remote branches in git not working

I want to list all the remote branches in git through command line. I typed the command git remote -v, but it didn't show any branches. I have just pulled the project and I want to list all remote branches. git branch -a also doesn't show up anything.

enter image description here

Upvotes: 0

Views: 1029

Answers (2)

V Shreyas
V Shreyas

Reputation: 449

As git remote -v does not show anything it is clear that your git repository has no remote. Add one!

Try adding the origin url using git remote add origin whatever_the_url_is

Upvotes: 3

Tim
Tim

Reputation: 9042

As per the git-branch documentation:

 git branch --list -r

or to list both remote and local

git branch -a 

Upvotes: 2

Related Questions