diff --git a/.gitconfig b/.gitconfig index 091137ec3bb1861421bb3135f320322250afe861..a92b3b880b10f1cc4fb370109896199e247e88a2 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,7 +11,6 @@ ff = merge --no-edit --ff-only master fixup = !git commit --fixup $(git last-commit) forget = reset HEAD^ - last-commit = "!git log --no-merges --abbrev-commit --format=\"%h %s\" | awk '{if ($2 != \"fixup!\" && $2 != \"squash!\") {print $1; exit}}'" merg = merge --no-edit posh = push --set-upstream origin HEAD pul = pull --progress diff --git a/Documents/bin/git-last-commit b/Documents/bin/git-last-commit new file mode 100755 index 0000000000000000000000000000000000000000..8611b27ccb5948631effb263f5b3edaaa2a00b1f --- /dev/null +++ b/Documents/bin/git-last-commit @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +git log --no-merges --abbrev-commit --format="%h %s" | awk '{if ($2 != "fixup!" && $2 != "squash!") {print $1; exit}}'