Get List of all local branches git command


In order to find out the list of all local branches of your project make use of the git branch command,

Example:
% git branch

  feature/JIRA-1
  feature/JIRA-B
* master
  main
  release
Git Branch command to list all local branches
Git List of all Local Branches

As in the above example, you do not need to pass any options, all the branches that are available locally will be displayed in alphabetical order with an asterisk (*) in front of the current branch that you are on.

✌️Press the q button to come back to the shell from the list branch results.







Author Info:

Rakesh (He/Him) has a Masters Degree in Computer Science with over 15+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright Β© Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap