Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 142f5474de
Fetching contributors…

Cannot retrieve contributors at this time

executable file 19 lines (16 sloc) 0.54 kB
#!/bin/bash
#
source "$G2_HOME/cmds/color.sh"
[[ $("$GIT_EXE" diff --cached --numstat | wc -l) -eq 0 ]] && error "fatal: no files to amend, please <freeze> the changes to amend."
$("$GIT_EXE" g2haslocalcommit)
if [[ $? -eq 0 ]]; then
if [[ $1 = "-f" ]]; then
read -p "Warning: force amending will rewrite the history, please confirm (y/n)? " -n 1 -r
echo
[[ $REPLY != [yY]* ]] && exit 1
else
echo_fatal "fatal: no local commits to amend."
exit 1
fi
fi
"$GIT_EXE" commit --amend -C HEAD
Jump to Line
Something went wrong with that request. Please try again.