From 47d411ce4df07f7479f70b4538374b87c11c6aaf Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Tue, 20 Dec 2011 10:21:07 +0100 Subject: [PATCH] Added a script to clean repo --- clean_uncommited | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 clean_uncommited diff --git a/clean_uncommited b/clean_uncommited new file mode 100755 index 0000000..a255718 --- /dev/null +++ b/clean_uncommited @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh + +[[ $1 != "-f" ]] && { print "Use -f option to delete:" } + +for fic in $(git status | tail -n +5| head -n -1 |awk '{print $2}'); do +print '[?]' $fic +[[ $1 = "-f" ]] && \rm $fic +done