From 3b45295c04e909441b62eea0e3307aa0323c235c Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 8 Oct 2020 14:04:47 -0500 Subject: [PATCH] add git pr alias for github pull request checkout --- base/.gitconfig | 1 + 1 file changed, 1 insertion(+) 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 -- 2.48.1