git branch current code example
Example 1: how to get current git branch
git branch --show-current
Example 2: git diff current repo and other branch
Just specify your local branch1 or remote origin/branch2
git diff branch1 origin/branch2 #show diff referenced from second branch