mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
12 lines
198 B
Bash
Executable file
12 lines
198 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
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
|