CoreUI ONE — 250+ PRO components and 25+ admin templates for React, Angular, Vue, Bootstrap and Next.js, plus Data Grid, Scheduler, 4,300+ PRO icons and the Next.js boilerplate. One license. → See what you get

How to list branches in Git

Listing branches is essential for navigating Git repositories, understanding project structure, and managing multiple development streams in collaborative workflows. As the creator of CoreUI, a widely used open-source UI library, I regularly list branches across multiple repositories to track feature development, review contributor work, and manage release branches. From my expertise, the most comprehensive approach is to use git branch with various flags for local and remote branch information. This method provides complete visibility into repository structure, branch status, and tracking relationships for effective branch management.

Use git branch command with flags to view local, remote, and all branches in the repository.

git branch          # List local branches
git branch -r       # List remote branches
git branch -a       # List all branches (local + remote)
git branch -v       # List with last commit info

The git branch command shows all branches in your repository with the current branch marked by an asterisk (*). Use -r flag to see remote branches from origin and other remotes, or -a to see both local and remote branches. The -v flag adds verbose output showing the last commit hash and message for each branch. Remote branches appear with their remote name prefix like origin/main. This helps you understand the complete branch structure and identify available branches for checkout or merging.

Best Practice Note:

This is the same approach we use in CoreUI development for navigating complex branch structures and managing multiple contributors. Use git branch --merged to see branches that have been merged into the current branch, and git branch --no-merged to identify branches with unmerged work for cleanup and maintenance.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author

Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
Genius Bootstrap Admin Template
Genius Bootstrap Admin Template

Fixing "Error: spawn EBADF" in Angular 22.2 ng serve and ng test
Fixing "Error: spawn EBADF" in Angular 22.2 ng serve and ng test

Bootstrap Calendar: From Date Picker to Full Scheduler
Bootstrap Calendar: From Date Picker to Full Scheduler

Bootstrap Data Table: When a Plain Table Stops Being Enough
Bootstrap Data Table: When a Plain Table Stops Being Enough