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

git , submodules and remove from historic question

From
FLFIGADERE, LAURENT <laurent.figadere@atos.net>
Date
Jan 13, 2020, 09:41 UTC
Message-ID
<HE1PR0202MB263439EFAE785201C61495ABE6350@HE1PR0202MB2634.eurprd02.prod.outlook.com>
In-Reply-To
<HE1PR0202MB2634CD91D2750E199098FACAE6350@HE1PR0202MB2634.eurprd02.prod.outlook.com>
Dear git community ,
I am using git submodule features.
So, by example, I have a repository top which include a sub repository sub-repo.
I would like to re-write the whole historic on the top repository without the sub-repo.
I tried to use git-filter command but I have an issue on sub-repo.

Here the commands and outputs: [10:27:42] $ git submodule d3fc420ee38babe74d6e3838b5b2a946ee551fa7 sub-repo (v1.0)

[9:55:48] $ git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch sub-repo' --prune-empty --tag-name-filter cat -- --all Rewrite 471a2c664466a364bfe5fdf774c7c0d7efe50396 (32/54) (3 seconds passed, remaining 2 predicted)    fatal: exec '--super-prefix= sub-repo/': cd to sub-repo' failed: No such file or directory error: Submodule sub-repo' could not be updated. error: Submodule ' sub-repo' cannot checkout new HEAD. Could not initialize the index

Was somebody able to remove such historic from a top repository? Thanks by advance for your help.

Kind Regards, Laurent FIGADERE

Next: Jonathan Nieder
Message 1 of 2 in “git , submodules and remove from historic question”
  1. FIGADERE, LAURENTJan 13, 2020
  2. Jonathan NiederJan 15, 2020

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.