From: Stefan Näwe Date: Wed, 04 Mar 2009 12:28:07 GMT Subject: Re: How does Git know which files no longer needed during upgrade? Message-ID: In-Reply-To: <20090304094951.GA32433@coredump.intra.peff.net> Jeff King peff.net> writes: > > > cd /path/to/copy > > rm -rf * > > cp -a /path/to/new/version/* . > > git add -A > > git commit -m 'update foo to 2.0' > > Nit: "rm -rf *" will miss files starting with '.'. So it is probably > simpler to say what you mean: delete all files managed by git: > > git ls-files -z | xargs -0 rm -f > > -Peff But maybe one wants to keep a .gitignore file. Regrads, Stefan