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 Branch command to list all local branches](https://code2care.org/git/get-list-of-all-local-branches-git-command/images/Git Branch command to list all local branches.png)
![Git List of all Local Branches Git List of all Local Branches](https://code2care.org/git/get-list-of-all-local-branches-git-command/images/Git List of all Local Branches.png)
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.
More Posts related to Git,
- Change the default git branch name from master to main
- [Fixed] Git Clone git@github.com: Permission denied (publickey) Could not read from remote repository Fatal error
- [Solution] fatal: not a git repository (or any of the parent directories): .git
- [fix] zsh: command not found: git
- How to Install Git on Windows
- Setup Git + Visual Studio Code Tutorial
- How to undo last Git Commit on Local Repository?
- Install GitHub Command Line Tool on Mac
- How to Create a Git Branch in 6 Different ways
- Fix Git: Warning: could not find UI helper GitHub.UI on Windows
- Git Config Command - A Deep Dive
- Step-by-Step: How to delete a git branch from local as well as remote origin
- How to Add Git Bash Option to Windows Terminal List
- Command to Clone Repository Using Git Bash
- How to remove or unstage a file from git staged area
- Get the file location of git config values
- GitHub: How to Search Code
- How to check your installed version of Git
- Fix: error: src refspec master does not match any failed to push some refs to Git
- Git: Step-by-Step - How to Push Local Brach to GitHub
- How to Merge Branch into Master Branch
- fix fatal: --local can only be used inside a git repository error
- Fix: Git Pull Error: unable to resolve reference refs/remotes/origin/master: reference broken
- Change the default diff or commit editor for git
- Git Fix: fatal: refusing to merge unrelated histories Error
More Posts:
- Create Custom Toast Android Programming - Android
- How to Add Notepad Shortcut to Desktop on Windows 11 - Windows-11
- vi undo redo command [Examples] - Mac-OS-X
- Fix: error: Jupyter command `jupyter-nbconvert` not found [VSCode] - Python
- Bash command to Read, Output and Manipulate JSON File - Bash
- PowerShell Fix: Get-Help cannot find the Help files for this cmdlet on this computer - Powershell
- The declared package does not match the expected package Eclipse - Android
- How to view Log file content using Mac Terminal - MacOS