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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

432 views 0 1
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