- Published on
Squashing commits with git reset
- Authors
- Name
Squashing commits with git reset
Squash commits without using git rebase
- Squashing the commits
git reset --soft HEAD~<number_of_commits>
or
git reset --soft <commits ID>
- Commit the changes
git commit -m “my new merged commit”
- Push to remote branch
git push origin branch --force-with-lease