Skip to main content
3 of 4
deleted 372 characters in body
Ayan
  • 8.6k
  • 4
  • 48
  • 52

To squash the last 10 commits into 1 single commit:

git reset --soft HEAD~10 && git commit -m "squashed commit"

If you also want to update the remote branch with the squashed commit:

git push -f
Ayan
  • 8.6k
  • 4
  • 48
  • 52