git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: Re: git checkout -f branch doesn't remove extra files

From
DJDave 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
Next: Linus Torvalds
Message 1 of 8 in “Fwd: Re: git checkout -f branch doesn't remove extra files”
  1. Dave JonesAug 13, 2005
  2. Linus TorvaldsAug 13, 2005
  3. Dave JonesAug 13, 2005
  4. Linus TorvaldsAug 13, 2005
  5. Linus TorvaldsAug 13, 2005
  6. Petr BaudisAug 13, 2005
  7. Sergey VlasovAug 13, 2005
  8. Petr BaudisAug 13, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.