List all branches that are already merged into a particular branch

git branch --merged <respective_branch_name> 

Example
git branch --merged master

The above command will help you to find all branches that are already merged with the master branch.

Quickly switch to the previous branch

git checkout -

This will switch to the previous branch you checked out.

Alternatives

git checkout @{-1} // checks out to previous branch 

git checkout @{-2} // checks out to second previous branch

List all branches ordered by most recent commits

git branch --sort=committerdate

The above command will list branches in order of the most recent commits. So you can see branches that you are using it most in recent times.

Very helpful command and it comes in handy when you are working with multiple branches.

#github #git #programming #coding #software-development

9 useful tricks of git branch you might not know
1.05 GEEK