Don’t let ‘fixed typo’ or ‘test’ commits ruin your main branch. Merge them into one clean commit before pushing.
git rebase -i HEAD~3 # Pick first, squash others
Related posts:

Git: Fix a File That Keeps Reverting to an Old Version in Status and Diff Because assume-unchanged W...

Git: Fix a Signed Commit Showing as Unverified After a Rebase Even Though Nothing in the Diff Actual...
