summaryrefslogtreecommitdiff
path: root/.gitconfig
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2021-02-17 19:28:34 +0100
committerTobias Klauser <tklauser@distanz.ch>2021-02-17 19:28:34 +0100
commit0cf20e74e3a4e626f3757e99554a16e21fa5a1b7 (patch)
tree50c2df9e51890187b38d1f11efb3cb8e2f9c1bfe /.gitconfig
parent23dc54c4ca6972d72e1f7635009127bc9da83e75 (diff)
Add git pr alias
Diffstat (limited to '.gitconfig')
-rw-r--r--.gitconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitconfig b/.gitconfig
index a4f6125..5f9b3f1 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -30,6 +30,7 @@
gofmt = codereview gofmt
mail = codereview mail -trust
pending = codereview pending
+ pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
submit = codereview submit
sync = codereview sync
today = commit --amend --date=now --no-edit