Sourcetree (OSX): workflow for merging github pull requests

I am using Sourcetree to manage a repository on github.

I recently received a pull-request for relative to such github repository. Ideally I would like to:

  1. configure Sourcetree to receive notifications of github pull requests in the application
  2. checkout the pull request in my local repository to inspect the changes, run tests ecc ecc
  3. accept the pull request (i.e. merge and push to the github repository)

I am not sure if point 1. is supported right now but I am sure the rest can be done in Sourcetree without resorting to command-line git.

Can you please help me out with the relevant steps that have to performed to achieve points 2. and 3. ?

Thank you

Stefano

 

1 answer

(These instructions are for windows, but it should be exactly the same for OSX with the equivalent actions for double click and right click.)

  1. Not supported.
  2. For looking at the Diff and making comments, your best option is the GitHub web interface. To view/compile/run the code on your computer, you need to checkout the source branch of the pull request:
    1. Fetch.
    2. In the Remotes section, open the origin node, locate the source branch of the PR and double click it to checkout that branch. If you get a dialog, just press OK without changing anything.
    3. Now you can compile, run, etc.

    1. Check out the target branch, like above.
    2. Right-click the name of the source branch, select "Merge <source> into current branch.
      1. If there are merge conflicts, resolve them and commit the changes without editing the contents of the stage in the commit dialog.
      2. If there are no conflicts, the merge commit will be created automatically.
    3. Push the merge commit (the target branch).

 

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

256 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot