I forked a repository as a starting point for a new project, never intending to submit pull requests to the original repo. It's become annoying to have to select my own master branch every time I want to merge a branch in the GitHub interface.

How can I remove the reference to the upstream so that my own master branch will be automatically selected when creating merge requests?

I tried editing .git/config as suggested here, but my config file does not include any reference to the upstream.

  • Can you use git? – AccioBooks Feb 9 '16 at 19:39
  • You mean to do the merges? I'm sure I could, though I'd prefer to remove the upstream as I'm afraid a fellow developer may someday accidentally send a pull request to the wrong place. – Nathan Arthur Feb 9 '16 at 19:42

Unfortunately, it doesn't seem to be possible. However, for a small project like mine, I was able to go with the less-than-ideal solution without too much pain:

  1. Make sure your local copy of the repo is up-to-date.
  2. Take a screen shot of, or otherwise note, open issues currently in the repo.
  3. Delete the repo on GitHub.
  4. Create a new repo on GitHub with the same name.
  5. In your local copy, modify the old remote to point to the new GitHub repo.
  6. Re-add issues, collaborators, etc, as needed.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.