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

automatically removing missing files beneath a directory

From
Geoffrey Irving <irving@naml.us>
Date
May 8, 2008, 16:39 UTC
Message-ID
<7f9d599f0805080939j3ef5e145w9bc2ac94f559b036@mail.gmail.com>

If I have a subdirectory in a git repository, and I remove some files without telling git, is there is a simple way to automatically run the equivalent of 'git rm' for all the missing files? git commit -a would work, except that I only want to remove files beneath a particular subdirectory. git add <directory> does the equivalent operation for adding files, but I don't see a way to automatically remove them without parsing the output of git status.

Thanks, Geoffrey

Next: Jeff King
Message 1 of 5 in “automatically removing missing files beneath a directory”
  1. Geoffrey IrvingMay 8, 2008
  2. Jeff KingMay 8, 2008
  3. Geoffrey IrvingMay 8, 2008
  4. Jeff KingMay 8, 2008
  5. Geoffrey IrvingMay 8, 2008

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.