Massive git commit squashing
Posted
by Nycto
on Stack Overflow
See other posts from Stack Overflow
or by Nycto
Published on 2010-06-11T21:53:14Z
Indexed on
2010/06/11
22:13 UTC
Read the original article
Hit count: 245
My company is in the middle of converting from CVS over to git. We've been on CVS for a long time, so there is a huge history. Too much to do by hand.
Looking at the logs, there is a lot of squashing that could be done. A whole lot. What I would like to do is hook in a script that will compare two adjacent commits. If it returns true, then concatenate the commit messages and squash the commits. I would also be happy with a command that accepts two commits and a commit message, then squashes them together.
git rebase --interactive is close to what I need, but "squash" requires far too much manual intervention. I also looked at using "fixup" instead of squash, but I don't want to lose the commit messages.
Any ideas?
© Stack Overflow or respective owner