git branch --set-upstream-to=<distant>/<branche> master code example Example: git push set upstream git push --set-upstream origin <branch>