« Back to Index

Process for rebasing Pull Request

View original Gist on GitHub

Process for rebasing Pull Request.md

  1. On the PR branch
  2. git rebase -i master (i.e. git rebase -i {parent_commit_of_first_commit_in_PR})
  3. Change top commit (the oldest) to reword
  4. Change all other commits to fixup
  5. In commit message (line 1) change title to reflect entire PR
  6. In commit message (line 2) add Closes #n and/or Fixes #n
  7. In commit message (line 3) add Authors: @integralist
  8. git checkout master
  9. git merge {PR_branch} or git cherry-pick {new_rebased_commit}
  10. git branch -D {PR_branch}
  11. git push origin master