Viewing branches in Git

Viewing branches in Git

when we create multiple branches and sub-branches of our code .we should able to see all the branches before switching we use git branch parameter

we can check merged, unmerged, local all other branches by providing a specific parameters

the current branch has an * (asterisk ) before its name in the git output

View all local branches

git branch

View all remote-tracking branches and local branches

git branch -a

View only remote-tracking branches

git branch -r

List merged branches

git branch --merged

List only non-merged branches

git branch --no-merged
Last updated on by vishal devxo