summaryrefslogtreecommitdiff
path: root/bin/git-squash
blob: 26c363c938b35ca4f6aec62c4675122bb0d3b851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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}" "$@"