Skip to content

Instantly share code, notes, and snippets.

@davidpede
Last active March 31, 2016 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidpede/70cc0d9d5194c89035b14e96dfcf0afa to your computer and use it in GitHub Desktop.
Save davidpede/70cc0d9d5194c89035b14e96dfcf0afa to your computer and use it in GitHub Desktop.
GitHub PR management and merge example
MERGE PR - Have issued pr to upstream branch:
1. Open target repo in cmd
2. git checkout develop
3. git checkout -b test-branch-name develop
*create and switch to a new branch, from develop to test the pr changes
4. git pull https://github.com/account/fork-repo.git pr-branch-name
*pull the whole pr branch into test branch
5. Review changes in test branch
6. git checkout develop
*if happy then switch to branch you wish merge the test branch to
7. git merge test-branch-name
*merge the test branch into develop. Don't use '--no-ff' to avoid merge commit.
Can use cherrypick at this stage to select specific commits instead of merging the whole test branch.
8. git push origin develop
*update the remote develop branch
MERGE DEV INTO MASTER BRANCH:
1. git checkout master
2. git merge develop
3. git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment