Last active
August 14, 2017 14:28
-
-
Save ollyg/9db70a621d0638b491354e39e5b27bf1 to your computer and use it in GitHub Desktop.
Inspect a github pull request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
branchlog = "!git log --oneline --decorate --left-right --graph master..." | |
pr = "!sh -c \"git checkout -b pr/$1 && curl -sL $(git config --get remote.origin.url | sed -e 's|:|/|' -e 's|^git@|https://|' -e 's|\\.git$|/pull/$1.patch|') | git am --whitespace=nowarn\" -" | |
pr-clean = "!git checkout - ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When working with PR from a fork, additional steps are required to update the PR.
git fetch git://github.com/USERNAME/netdisco-mibs.git BRANCHNAME
git push git://github.com/USERNAME/netdisco-mibs.git +pr/NN:BRANCHNAME
In the above, NN is the PR number and BRANCHNAME is the PR branch at the repo fork (given under "Command Line Instructions" on the PR page).