implemented git-clear

i wanted a simple command to restore the state of a repo as if it was
freshly cloned with the current HEAD. This is basically git reset --hard
with deletion of all untracked files that are in the repo.
This commit is contained in:
grindhold 2015-08-26 21:58:22 +02:00
parent dae750f734
commit ad7811e991

5
bin/git-clear Executable file
View file

@ -0,0 +1,5 @@
echo "Sure? [Y/n]"
read ans
if [ "$ans" != "n" ]
then git ls-files --others --exclude-standard | xargs rm ; git reset --hard
fi