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

Cleaning projects with submodules

From
Simon Richter <simon.richter@hogyros.de>
Date
Apr 25, 2015, 21:36 UTC
Message-ID
<553C08D9.9000907@hogyros.de>
Hi,

I'm trying to set up a continuous integration build for Boost, which uses massive amounts of submodules, and keep running into problems when running "git clean" in the toplevel project.

When I switch to a version where a submodule has been removed (e.g. an earlier version), "git clean -dx" will not remove the submodule's directory, because it has its own .git directory. Using a single -f flag, the process fails (because directories containing .git directories are no longer skipped), and using -ff removes all submodules (which is overkill).

Is there a good way to clean a project, leaving valid submodules in place (these are then switched to the new tip and cleaned in separate commands) while removing submodules that are no longer referenced?

   Simon
Next: Heiko Voigt
Message 1 of 2 in “Cleaning projects with submodules”
  1. Simon RichterApr 25, 2015
  2. Heiko VoigtApr 27, 2015

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.