Fwd: Re: git checkout -f branch doesn't remove extra files
- From
- Dave Jones <davej@redhat.com>
- Date
- Aug 13, 2005, 04:17 UTC
- Message-ID
- <20050813041737.GB25236@redhat.com>
Gar, got caught by the 'reply-to' going to Tony only...
Dave
On Fri, Aug 12, 2005 at 10:31:17AM -0700, Luck, Tony wrote: > I've just got around to noticing some of the new (to > me) features in git, and started experimenting with > branches.
Seems a good day to learn new features, I was completely unaware of git-ls-files somehow.
My git snapshot creator that builds the hourly tarballs at http://www.codemonkey.org.uk/projects/git-snapshots/ currently does an rsync, and then a checkout, and finally it cleans up by removing all the checked out files. It currently does this by hand, but on learning about this 'new' command, I thought, cool, now I can do..
git-ls-files | xargs rm -rf
however, this then leaves a bunch of empty subdirs, as git-ls-files doesn't list the subdirs by themselves in the output. Am I missing some other option ?
Dave