]> git.sev.monster Git - dotfiles.git/commitdiff
add git pr alias for github pull request checkout
authorsev <git@sev.monster>
Thu, 8 Oct 2020 19:04:47 +0000 (14:04 -0500)
committersev <git@sev.monster>
Thu, 8 Oct 2020 19:04:47 +0000 (14:04 -0500)
base/.gitconfig

index 91550b24b3beea92b18061e6188511e8555d18f8..5ed2164e109f1473df105298d4f4e1ee9f02f179 100644 (file)
@@ -5,5 +5,6 @@
 [alias]
        push-all = !git remote | xargs -n1 git push
        submodules-pull = submodule foreach git pull origin master
+       pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
 [pull]
        ff = only
This page took 0.034695 seconds and 4 git commands to generate.