0

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?

Danny Delott
  • 6,756
  • 3
  • 33
  • 57
  • 1
    hi danny, have you checked if http://stackoverflow.com/questions/4878249/how-do-i-change-the-remote-a-git-branch-is-tracking will answer your question? – pcantalupo Oct 14 '15 at 01:25
  • The answer marked correct in that post didn't work due to an ambiguity error. I'll post the exact message when I get back to my desk. – Danny Delott Oct 14 '15 at 01:27

0 Answers0