« Back to Index

GitHub Open-Source Pull Request Flow

View original Gist on GitHub

Tags: #git #github

GitHub Open-Source Pull Request Flow.md

  1. Fork open-source project.
  2. Create branch and make changes.
  3. Push branch to your fork.
  4. Visit open-source project and open a pull-request (select your fork’s branch).
  5. Wait for your PR branch to be merged into the open-source project’s master.
  6. Once merged, add the open-source project as a ‘remote’ (git remote add upstream <github.com/user/repo.git>).
  7. git checkout master
  8. git fetch upstream (convention states we use ‘upstream’ as the name of the remote).
  9. git rebase upstream/master (alternative to fetch/rebase, is git pull --rebase upstream master).
  10. git push origin master.
  11. git branch -d <your-pr-branch> (the PR branch is no longer needed).
  12. git push origin --delete <your-pr-branch>.