Over a million developers have joined DZone.

Merging a Pull Request in GitHub

· DevOps Zone

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

Often a pull request cannot be merged online due to conflicts. If there's no conflict, it is easy for you to do merging, even from the web client, with one click.

image

Confirm the merge

image

If the pull request cannot be merged online or you wish to test things locally before sending the merge to the repo on Github, you can perform the merge locally instead. 
This post will explain subject using GitHub project for this task under windows with tool tortoisegit[1]

1. Open your local repo (make pull the repo from git.)

2. Check out the branch you wish to merge to

git checkout master

image

3. Pull the desired branch from the other user's repo 
git pull https://github.com/otheruser/repo.git branchname

image

4. Resolve any conflicts and commit the merge and review the changes and ensure they are satisfactory

image

5. Push the merge to your GitHub repo 
git push origin master

image

[1] https://code.google.com/p/tortoisegit/

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

Topics:

Published at DZone with permission of Madhuka Udantha, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}