tj.git-extras/bin/git-clear
Richard Fearn 82d6a7265f git-{clear,clear-soft,sync}: improve yes/no prompts
Don't print trailing newline; prompt for yes/no response on the same line
2016-11-19 16:41:19 +00:00

8 lines
215 B
Bash
Executable file

#!/usr/bin/env bash
echo -n "Sure? - This command may delete files that cannot be recovered, including those in .gitignore [y/N]: "
read ans
if [ "$ans" == "y" ]
then git clean -d -f -x && git reset --hard
fi