Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k points)
edited by

git branch -a //shows both remote and local branches.

git branch -r //shows remote branches.

Is there a way to list just the local branches?

1 Answer

0 votes
by (50.2k points)

For this, 

you can use git branch without any options that will list your local branches. 

“With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk”

You need to do is: 

git branch


Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.1k users

Browse Categories