View all merged Git branches
Looking for a way to list all merged branches in your Git repository? This can be useful in a variety of scenarios, including cleaning up your repository or identifying branches that are ready to be deleted.
Using git branch -a --merged
allows you to view a list of all merged local branches. This command displays branches that have been merged into the current branch, making it easy to identify branches that are no longer needed. Use the arrow keys to navigate the list and press Q to exit.
# Syntax: git branch -a --merged git checkout master git branch -a --merged # patch-1 # patch-2