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

how to delete from history some files, and commits with them?

From
TTTikhon Tarnavski <t.t@unixforum.org>
Date
Jul 14, 2010, 15:46 UTC
Message-ID
<loom.20100714T170722-272@post.gmane.org>
Hello.

I'm using git for several small projects, and now one of those pgojects have to be divided into two independent parts. So I want to divide git history respectively. I can create two clones and run filter-branch in both to delete files. But I can't find how I may delete empty commits after that. Naturally, I'd prefer to do all process automatically: removing unnecessary files and deleting empty commits without searching to its' hashes.

Can you suggest any solution?
Next: Jonathan Nieder
Message 1 of 3 in “how to delete from history some files, and commits with them?”
  1. Tikhon TarnavskiJul 14, 2010
  2. Jonathan NiederJul 14, 2010
  3. Тихон ТарнавскийJul 14, 2010

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.