From: sev Date: Thu, 8 Oct 2020 19:04:47 +0000 (-0500) Subject: add git pr alias for github pull request checkout X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/1c9a18a31c533e3b32315ab835e96d725c94dcf4?ds=sidebyside;hp=0176bb959db5444fa8db3a5b4887e629287fe010 add git pr alias for github pull request checkout --- diff --git a/base/.gitconfig b/base/.gitconfig index 91550b2..5ed2164 100644 --- a/base/.gitconfig +++ b/base/.gitconfig @@ -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