tj.git-extras/bin/git-clear-soft
2023-06-19 21:51:53 +08:00

8 lines
244 B
Bash
Executable file

#!/usr/bin/env bash
echo -n "Sure? - This command may delete files that cannot be recovered. Files and directories in .gitignore will be preserved [y/N]: "
read -r answer
if [ "$answer" == "y" ]
then git clean -d -f && git reset --hard
fi