Remote then Local
It is easy to setup a local branch (we’ll call it zzz here) to track a pre-existing remote branch:
$ git –track branch zzz origin/zzz
Alternately, if you use the branch.autosetupmerge setting in your git config to enable automatic branch tracking [1], the command is even shorter:
$ git branch zzz origin/zzz
Local then Remote (reverse)
This much [...]