Flatten old history in Git
Posted
by
schoetbi
on Stack Overflow
See other posts from Stack Overflow
or by schoetbi
Published on 2010-12-22T06:37:05Z
Indexed on
2010/12/22
6:54 UTC
Read the original article
Hit count: 217
git
I have a git project that has run for a while and now I want to throw away the old history, say from start to two years back from now. With throw away I mean replace the many commits within this time with one single commit doing the same.
I checked "git rebase -i " but this does not remove the other (full) history containing all commits from git.
Here a graphical representation (d being the changesets):
(base) -> d1 -> d2 -> d3 -> (HEAD)
What I want is:
(base,d1,d2) -> d3 -> (HEAD)
How could this be done? Thanks.
© Stack Overflow or respective owner