Skip to main content
edited tags
Link
Romain Valeri
  • 21.1k
  • 3
  • 42
  • 67
Source Link
runnerpaul
  • 6.7k
  • 10
  • 63
  • 145

Squash 2 commits into 1

I have two commits locally:

commit adae40c5e2b69a41447b08cc3dcb77003611fbbe
Author: Me
Date:   Thu Mar 21 14:17:35 2019 +0000

    1.0.0

commit ceaa65ea06f48dc24554a6f798aae2d668f3a43d
Author: Me
Date:   Fri Feb 1 10:04:36 2019 +0000

    first commit

How do I squash these so there is only one commit with the message 1.0.0?

I tried the following but neither has worked for me:

git rebase -i HEAD~2
git rebase -i master