Thanks Otto. I have a similar bash function I use:

function gpr() {
        echo "Fetching and checking out new git branch pr$@..."
        git fetch --all
        git checkout master
        git pull upstream master
        git checkout "upstream/pr/$@"
        git checkout -b "pr$@“
}

Usage: For PR 1234

$ gpr 1234

Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Mar 23, 2017, at 7:00 AM, Otto Fowler <[email protected]> wrote:
> 
> On the metron project, many of our committers use a couple of scripts when
> working with PRs, either cloning and testing or preparing commits.
> I have created a version of the checkout-pr script for the nifi project,
> and though maybe someone would be interested.
> 
> This work is a fork of Nick Allen’s original repo for Metron.
> 
> https://github.com/ottobackwards/commit-pr-stuff
> 
> If you look in the nifi folder, there is a checkout-nifi-pr script, which
> when called will checkout a pr for you to work with.
> I am not sure if you have something similar already, but I thought I would
> throw this over the wall just the same.
> 
> O

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to