Flatten old history in Git
- by schoetbi
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.