Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Merging a Pull Request in GitHub

DZone's Guide to

Merging a Pull Request in GitHub

· DevOps Zone ·
Free Resource

Download the blueprint that can take a company of any maturity level all the way up to enterprise-scale continuous delivery using a combination of Automic Release Automation, Automic’s 20+ years of business automation experience, and the proven tools and practices the company is already leveraging.

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 ‘Practical Blueprint to Continuous Delivery’ to learn how Automic Release Automation can help you begin or continue your company’s digital transformation.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}