git: how to squash the first two commits?

Posted by kch on Stack Overflow See other posts from Stack Overflow or by kch
Published on 2009-02-28T20:55:09Z Indexed on 2010/04/18 13:13 UTC
Read the original article Hit count: 371

Filed under:
|
|

With git rebase --interactive <commit> you can squash any number of commits together into a single one. It's an OCD heaven.

And that's all great unless you want to squash commits into the initial commit. That seems impossible to do.

Any way to achieve it?


Moderately related:

In a related question, I managed to come up with a different approach to the need of squashing against the first commit, which is, well, to make it the second one.

If you're interested: git: how to insert a commit as the first, shifting all the others?

© Stack Overflow or respective owner

Related posts about git

Related posts about scm