question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can RG recommend me the command to fetch a PR locally?

See original GitHub issue

Sometimes you want to pull a PR locally to test and it’s really some work when you have to do something like

git fetch remote_name pull/PR_No/head:Branch_name Eg: git fetch origin pull/1234/head:pr-1234

Read more at: https://blog.scottlowe.org/2015/09/04/checking-out-github-pull-requests-locally/

Can Refined Github suggest the command itself by doing the hard work of sorting the PR_No and Branch_name itself?

I think it’s also possible to suggest a remote_name too by checking if the username of user matches the owner of the repo.

Example: https://github.com/substack/browser-launcher/pull/35

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
fregantecommented, Feb 10, 2020

Honestly I would suggest this to GitHub themselves; this text should be added by them:

However I wouldn’t mind adding a couple of “click to pull” buttons on all PRs (also replacing that text on PRs you can merge):

  • one button copies hub pull $url
  • the other button is a GitHub Desktop link, like the one appearing above
1reaction
fregantecommented, Sep 25, 2020

PR welcome to add a third tab in that dropdown with instructions to fetch the PR with the ability to push to that origin. The dropdown only exists for maintainers, so it makes sense to include that ability.

I think the command is this, but exploration needed:

git remote add fregante https://github.com/fregante/refined-github.git
git checkout fregante/branch-of-this-pr
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can RG recommend me the command to fetch a PR locally?
Sometimes you want to pull a PR locally to test and it's really some work when you have to do something like. git...
Read more >
Pull Request Proficiency: Fetching Abilities Unlocked - Atlassian
The way we use this to download all pull requests is to map how the remote repository stores the PR HEADs, and map...
Read more >
Checking Out GitHub Pull Requests Locally - Scott's Weblog
If you try to fetch into an existing branch, the command will fail, so specify the name of a branch you'd like created...
Read more >
How can I fetch an unmerged pull request for a branch I don't ...
Here're the commands that worked for me. ... If you want to merge this pending PR locally, then simply do: $ git merge...
Read more >
How to Grab a Pull Request Locally with Git Command Line
That's about it. Please add a comment if you have any questions. Once you have this working, you can use git checkout BRANCHNAME...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found