DEV Community

loading...

Discussion on: I'm a Git Master, Ask Me Anything

Collapse
rainbowtux profile image
Erwin Van de Velde

What is the best way to clean up old commits? E.g. I only want to keep history of the last 2 years and remove all older commits, in fact treating the 2 year old version as the initial commit?

Related: how to remove commits of a bigger file that was pushed in by a developer and that needs to be moved out (e.g. to git LFS or just a file repository server).