tj.git-extras/bin/git-back
spacewander 3917c774ec change: deprecate git-back
Thanks @vr8hub for the report.

git-back will be removed in the next next release.
2020-02-23 11:41:54 +08:00

14 lines
267 B
Bash
Executable file

#!/usr/bin/env bash
echo >&2 "Deprecated. Use 'git undo --soft [commitcount]' instead."
if test $# -eq 0; then
git reset --soft HEAD~1
else
if `echo $1 | grep -q [^[:digit:]]`; then
echo "$1 is not a number" 1>&2
else
git reset --soft HEAD~$1
fi
fi