I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remote branch?
I know I can just edit the
I use the following command (Suppose your local branch name is "branch-name-local" and remote branch name is "branch-name-remote"):
$ git branch --set-upstream-to=origin/branch-name-remote branch-name-local
If both local and remote branches have the same name, then just do the following:
$ git branch --set-upstream-to=origin/branch-name branch-name