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