Bruce Korb <bruce.k...@gmail.com> writes:

> WRT "distclean", I never do that any more.
> I clone the repo into a build directory and do all my
> fiddling there.  Yes, "git" has a command to remove
> everything, but I developed my procedures back in
> CVS (pre-svn) days, and old habits die hard....
> Purging all non-SCM managed sources is very reliable.

+1.  Unfortunately git doesn't have a single handy command for wiping
out all non-SCM files.  I'm using a small tool called 'gitco' (inspired
by 'cvsco') I wrote when I started to use git:

#!/bin/sh
# gitco - cruel checkout.  Discards everything that has not been
# committed, and checkout missing files.
#
# Written by Simon Josefsson.  Licensed under GPLv2 or later.
# Contributions by Yann Dirson.
git clean -d -x -f
git status
git reset --hard

/Simon

Reply via email to