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

Re: 500Mb file erroneously commited

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 6, 2011, 09:10 UTC
Message-ID
<vpq62oj2umf.fsf@bauges.imag.fr>
In-Reply-To
<20110606075508.GC19127@axel>
Axel Freyn <axel-freyn@gmx.de> writes:
Show 9 quoted lines
>  - if you have already other commit's on top of it, you can use e.g.
>    "git rebase" in order to redefine the history... something like (I'm
>    not sure it works exactly like that, but in principle)
>    git checkout -b tmp <WRONG_COMMIT>
>    git rm bigfile
>    git commit --amend
>    git checkout master
>    git rebase tmpfix
>    git branch -d tmpfix

That should work, but "git rebase -i" will make it much simpler (just "edit" or even delete the guilty commit).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Axel Freyn
Message 4 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.