Commit b4edb533 authored by Vitaly Lipatov's avatar Vitaly Lipatov

gamend: add support for commit separate files

parent 1f082bb1
......@@ -6,13 +6,20 @@
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "gitcam - do fast git commit amend (apply all current changes to the last commit)"
echo "Use: gitcam [-e]"
echo "Use: gitcam [-e] [file]"
echo " -e - edit commit message"
exit 1
fi
AMENDARG="-C HEAD"
if [ "$1" = "-e" ] ; then
docmd git commit -a --amend $@
else
docmd git commit -a --amend -C HEAD $@
AMENDARG=
shift
fi
# If no args
if [ -z "$1" ] ; then
AMENDARG="$AMENDARG -a"
fi
docmd git commit --amend $AMENDARG $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment