Sourcetree (OSX): workflow for merging github pull requests

stepelu August 6, 2015

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

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2015

(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
TAGS
AUG Leaders

Atlassian Community Events