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

Re: 500Mb file erroneously commited

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 6, 2011, 07:51 UTC
Message-ID
<4DEC86EE.1030101@drmicha.warpmail.net>
In-Reply-To
<loom.20110606T093627-918@post.gmane.org>
Bartolomeo Nicolotti venit, vidit, dixit 06.06.2011 09:43:
Show 8 quoted lines
> Hello,
> 
> we're using CVS to store some sources, but for some big projects I'm considering
> to use git. Last week it has happened that one collegue erroneously commited one
> big file, 500Mb the file only. To avoid to have this file in the repository
> we've deleted the history file in the CVS repository, the one with ,v, this has
> been easy as each file has its own history. Would it be possible to do the same
> with git, or there's no possibility to delete a 500Mb file erroneously commited? 

Due to the way git (or hg or...) works, you would have to rewrite the history in order to remove a file from a repo completely. The first example in the git-filter-branch man page describes how to do this.

Michael
Previous: Bartolomeo NicolottiNext: Axel Freyn
Message 2 of 4 in “500Mb file erroneously commited”
  1. Bartolomeo NicolottiJun 6, 2011
  2. Michael J GruberJun 6, 2011
  3. Axel FreynJun 6, 2011
  4. Matthieu MoyJun 6, 2011

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.