How do I pull a pull request's code locally for testing?

How do pull code from a pull request in order to test it? 

GitHub provides nice easy buttons / pre-populated git commands to do this. How do I do it with stash?

It baffles me that there isnt a simple button for this. This is a top tier reason people use version control. Just because it looks good in a diff doesnt mean it actually works. 

I know I could create an ailias to do this, but that defeats the whole point of bothering with Stash in the first place. 

1 answer

1 accepted

Hi Joseph,

@Nicola Paolucci covered this pretty nicely in this blog: http://blogs.atlassian.com/2014/08/how-to-fetch-pull-requests/

cheers,

Tim

Looks like a really good article and I'll have to read it more thoroughly soon. I honestly prefer the command line, I just wish there was a button like, "Pull this code locally" that generates all the git commands. GitHub does this nicely (although they first try to get you to use their terrible GUI).

That's a really nice idea, I've raised a suggestion here: https://jira.atlassian.com/browse/STASH-6826

Awesome. I appreciate it. In the mean time I'll have to work around this issue.

Brent Plump Atlassian Team Dec 16, 2014

Keep in mind that GitHub's "check out this PR" is just checking out the source branch. Nicola's article shows how to use Stash to pull the result of the PR merge (ie. what the target branch will look like if the PR is merged). It's a subtle but important difference.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,049 views 1 5
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