I forked a repo and renamed my origin remote from origin
to danny
. Then I set up a new remote called origin
that goes to the original repo.
Running git remote -v
returns the following output:
danny https://github.com/DannyDelott/repo.git (fetch)
danny https://github.com/DannyDelott/repo.git (push)
origin https://github.com/org/repo.git (fetch)
origin https://github.com/org/repo.git (push)
Later on, I was added as a collaborator on the original repo. Now I would like to change the remote my master
branch is tracking from the danny
remote, to my new origin
remote.
For example, right now if I run git status
, I get the following output:
On branch master
Your branch is ahead of 'danny/master' by 24 commits.
I have no intention of working off of my fork anymore. The fact that my current local copy of master is ahead of my fork's copy does not matter anymore.
How can I have my master
branch now track origin/master
?