Skip to content

Merging a Pull Request

drotter edited this page Oct 11, 2012 · 14 revisions

Merging a Pull Request

Create a testing branch

Create a new branch for testing purposes only from the pull requests target branch (develop in this sample). This branch should not be pushed to another repository!

git checkout -b prtest-1 develop

Get changes from Pull Request

Merge the changes of the pull request into our testing branch. You have to look up the URL to the users repository and the head branch he wants to merge.

git pull https://github.com/user/ZOOLU.git develop

Test the changes

Now test the pull request, and get them running correctly, if they are not doing already. Inform the contributor about bugs and other mistakes, so that he can correct them and commit the new changes. You can rerun the pull command from above to retrieve the new code. If you think the code is tested well enough and the user has commited all neccessary changes, you can delete the testing branch.

git branch -d prtest-1

Merge pull request

After testing the pull request you can merge it. Use the built-in automerge tool from github or merge the branch locally and push it to the upstream repository.

git checkout develop
git pull https://github.com/user/ZOOLU.git develop
git push upstream develop

Clone this wiki locally