Skip to main content
The 2024 Developer Survey results are live! See the results
2 of 5
added 4 characters in body
Xys
  • 10k
  • 3
  • 48
  • 60

2020 Simple solution without rebase :

git reset --soft HEAD~2

git commit -m "new commit message"

git push --force

2 means the last two commits will be squashed. You can replace it by any number

Xys
  • 10k
  • 3
  • 48
  • 60