+3

GitHub/others: allow to easily check out pull request source

Bugged 6 years ago updated by Hyper Sonic 1 year ago 1

Hi,

Can you put a button on his small menu, to allow me checkout on the pull request on a branch locally?

I would like to perform some updates on it, but first I need to checkout on it locally.

Image 244


Currently I open the command line and run: 

https://help.github.com/articles/checking-out-pull-requests-locally/

> git fetch lark pull/236/head:pull/236

From https://github.com/lark-parser/lark

 * [new ref]         refs/pull/236/head -> pull/236

> git checkout pull/236

Switched to branch 'pull/236'

I found a trick using only UI, athough it's not one-step yet:

1. Toggle the PR to show it in the log view

2. Right-click > Reveal commit

3. Double-click or right-click > Check out on the revealed commit (! you must click on the pulls/.../ID badge, not the grayed out text on the right, or it won't work !)

4. You can choose to work read-only for quick testing, or create a branch to keep working on the PR