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

Erase a commit from a git repository

From
TTTim Tassonis <stuff@decentral.ch>
Date
Jan 18, 2025, 20:50 UTC
Message-ID
<db7ea8df-2f37-47b9-828b-67b8d3068232@decentral.ch>
Hi all

Sorry if this is the wrong list, I have a question regarding a faulty commit that costs me quite a lot of diskspace.

I accidentally committed an pushed one gigabyte of firmware blobs into one of my git repositories, and noticed that too late, e.g. it was already on master and newer commits had occurred.

To my knowledge, there is no easy way to remove a commit out of an existing repository.

But I assume that there is a way around this: As one can easily migrate an svn repository to git with all history included, there surely is also a way to "migrate" a git repository to another git repository in the same way and then just leave that commit out.

As this sounds like quite a lot of manual work, I wondered if there is an automated process for this?

Bye Tim

Next: Reto
Message 1 of 3 in “Erase a commit from a git repository”
  1. Tim TassonisJan 18, 2025
  2. RetoJan 19, 2025
  3. Junio C HamanoJan 21, 2025

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.