summaryrefslogtreecommitdiffstats
path: root/git/.bin/git/git-amend
diff options
context:
space:
mode:
Diffstat (limited to 'git/.bin/git/git-amend')
-rwxr-xr-xgit/.bin/git/git-amend13
1 files changed, 13 insertions, 0 deletions
diff --git a/git/.bin/git/git-amend b/git/.bin/git/git-amend
new file mode 100755
index 0000000..3b937ec
--- /dev/null
+++ b/git/.bin/git/git-amend
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eu
+
+if [ -e "$(git root)/.git/branchless" ]; then
+ exec git branchless amend "$@"
+else
+ if [ "${1:-}" = "-i" ]; then
+ git add -p
+ else
+ git add -u
+ fi
+ git commit --amend
+fi