Over a million developers have joined DZone.

Merging a Pull Request in GitHub

· DevOps Zone

The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today

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.


Confirm the merge


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


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


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


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


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

The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today


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.

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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}