Skip to content

Instantly share code, notes, and snippets.

@Zannick
Zannick / .gitconfig
Created Jun 1, 2021
Github merge PR aliases
View .gitconfig
[alias]
pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
mpr = "!f() { git merge --no-ff --no-commit pr/$1 -m \"Merge $(github_get_issue $( (git remote get-url upstream 2>/dev/null || git remote get-url origin ) | sed -e 's/^[^:]*://' -e 's/[.].*$//') $1)\"; }; f"
jfmpr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git merge --no-ff --no-commit pr/$1 -m \"Merge $(github_get_issue $( (git remote get-url upstream 2>/dev/null || git remote get-url origin ) | sed -e 's/^[^:]*://' -e 's/[.].*$//') $1)\"; }; f"
View keybase.md

Keybase proof

I hereby claim:

  • I am zannick on github.
  • I am bswolf (https://keybase.io/bswolf) on keybase.
  • I have a public key ASCkevJAZGsPzFQh-gFygIu8KCNuCIK-4EjMLcDwC2qJPgo

To claim this, I am signing this object:

@Zannick
Zannick / footer.g
Created Aug 9, 2012
ANTLR v3 Test case for an error in syntactic predicate backtracking
View footer.g