use
git log --onlineto check all your commits history in a brief form.find the hash head of the first commit you want to squash to.
run
git reset --soft <hash>to reset the HEAD to that commit.run
git add .to add all the changes made in commits after the first one.run
git commit --amend -m "new commit message"to replace the old commit message in the first commit to the new one.ATTENTION: In step 5, omitting
--amendwould result in making a new commit and squash all commits into that new one instead of the first one.run
git push --force
Previous
Next
Function return type trap in TS.
2023-01-17