diff options
Diffstat (limited to 'bin/git-squash')
| -rwxr-xr-x | bin/git-squash | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/git-squash b/bin/git-squash new file mode 100755 index 0000000..26c363c --- /dev/null +++ b/bin/git-squash @@ -0,0 +1,14 @@ +#!/bin/bash -e + +# Retrofit changes onto an old commit during the next rebase/rewrite, +# adding an additional comment `git squash COMMITISH` (for example, +# `git squash HEAD`). + +COMMIT=HEAD +if [ $# -gt 0 ]; then + COMMIT="$1" + shift +fi + + +exec git commit --squash "${COMMIT}" "$@" |
