Re: how to squash a few commits in the past

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Sixt
Date: Wednesday, May 5, 2010 - 11:45 pm

Am 5/3/2010 11:33, schrieb Gelonida:

Use 'git filter-branch':

  git filter-branch \
    --index-filter 'git rm --ignore-unmatch --cached the/huge/file' \
    --prune-empty \
    -- --all

The --prune-empty removes the commit that removed the file from the
history if the removal of the/huge/file was the only thing it did.

If you have tags that must be rewritten, add "--tag-name-filter cat" to
the command before "--".

Try this in a backup copy or clone first!

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
how to squash a few commits in the past, Gelonida, (Mon May 3, 2:33 am)
Re: how to squash a few commits in the past, Michael J Gruber, (Mon May 3, 3:09 am)
Re: how to squash a few commits in the past, Gelonida, (Mon May 3, 1:45 pm)
Re: how to squash a few commits in the past, Gelonida, (Mon May 3, 1:55 pm)
Re: how to squash a few commits in the past, Gelonida, (Mon May 3, 2:20 pm)
Re: how to squash a few commits in the past, Ramkumar Ramachandra, (Wed May 5, 6:19 am)
Re: how to squash a few commits in the past, Gelonida, (Wed May 5, 2:41 pm)
Re: how to squash a few commits in the past, Johannes Sixt, (Wed May 5, 11:45 pm)