In this tutorial, we will learn how to change an existing local branch tracking to a different remote in git.
We can change a local branch tracking to the new remote by using the
git push command followed by
-u flag and
git push -u origin your-branch-name
your-branch-name should be your local branch name like
-u flag sets the upstream (tracking) reference to a remote branch.