Skip to main content
2 of 7
deleted 6 characters in body
br3nt
  • 9.4k
  • 3
  • 46
  • 66

Thanks to this handy blog post I found that you can use this command to squash the last 3 commits:

git rebase -i HEAD~3

This is handy as it works even when you are on a local branch with no tracking information/remote repo.

The command will open the interactive rebase editor which then allows you to reorder, squash, reword, etc as per normal.

br3nt
  • 9.4k
  • 3
  • 46
  • 66