Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ugultopu/65e3ea026c9fd642e6d04daa78d9f1ab to your computer and use it in GitHub Desktop.
Save ugultopu/65e3ea026c9fd642e6d04daa78d9f1ab to your computer and use it in GitHub Desktop.

When creating a pull request on an project that you forked, you should rebase the master branch of the original repository on your branch and then create the pull request. Similarly, when the branch of a pull request has become out of date w.r.t the master branch (that is, the default branch), again, you should rebase the default branch of the original repository on your pull request's branch and then force push your branch. So, while you are on your pull request's branch:

git remote add upstream https://github.com/original-owner-of-the-project/project-name
git rebase upstream/master
git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment