List the relationship between all local branches and remote branches:
git branch -vv
.
Set an existing local branch to track a remote branch:
git checkout master
git branch -u origin/master
Or put all together: git branch -u origin/master master
.
Ref:
How can I see which git branches are tracking which remote/upstream branch?
Make an existing Git branch track a remote branch?
Git Branching - What a Branch Is
Git Branching - Branches in a Nutshell