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.
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
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