summaryrefslogtreecommitdiff
path: root/bin/git-fixup
diff options
context:
space:
mode:
Diffstat (limited to 'bin/git-fixup')
-rwxr-xr-xbin/git-fixup13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/git-fixup b/bin/git-fixup
new file mode 100755
index 0000000..8910b2a
--- /dev/null
+++ b/bin/git-fixup
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+# Retrofit changes onto an old commit during the next rebase/rewrite:
+# `git fixup [COMMITISH]` (for example, `git fixup HEAD`).
+
+COMMIT=HEAD
+if [ $# -gt 0 ]; then
+ COMMIT="$1"
+ shift
+fi
+
+
+exec git commit --fixup "${COMMIT}" "$@"