git reset --hard undoes any changes to tracked files in your working directory and restores them to their versions at head of the branch. However, it doesn't remove untracked files from the working directory. For that you need git clean -x -d -f. To blow away all the cruft in your working directory and restore it to a pristine state, you need to do both.
cat > ~/bin/gitnuke
git reset --hard
git clean -x -d -f
^d
2010-01-07
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment