Sublime Forum

[TUT] How to locally merge a GitHub pull request with or without conflicts

#1

For this, will be used the http://www.syntevo.com/smartgit/download (Windows, Linux or OSX). With this, you can merge a pull request with conflicts or merge it on a different branch other than the branch where it was originally opened.

  1. Clone your repository with Smartgit, by going on the menu Repository -> Clone

  2. Checkout on the branch you wish to merge the pull request (develop or master, etc)

  3. After finish cloning, select the repository and press Ctrl+L (or just hit the Log button on the right upper side of the screen) to open the log

  4. Hit the GitHub sync button on the upper corner of the Branches tab/view

  5. Expand the Pull Requests line on the Branches tab/view

  6. Right click on the desired pull request and hit the Fetch Pull Request menu item

  7. Right click on the desired pull request and hit the Merge Pull Request menu item

  8. Let the option Merge to Local Repository selected and hit the Merge button

  9. Close the Log window and go to the main Smartgit window.

  10. If there are conflicts on the merge, right click the conflicted files and hit the Resolve… or Conflict Solver menus items

  11. After solving the conflicts, select the repository and hit on the Commit button

  12. Now hit on the Commit button again

  13. After committing, right click on the desired branch and select the Push… menu item


  14. Done!

If the branch where you merged the commit, was the same branch where the pull request was originally posted, GitHub will automatically set the merged pull request as Merged. Otherwise, you will need to manually close the Pull Request.

0 Likes