You create multiple commits and want to change the second latest:
git stash
git rebase -i origin/main
git stash pop
git add -p
git commit --amend
git rebase --continue

Open source. Open mind. Focused on TYPO3.
You create multiple commits and want to change the second latest:
git stash
git rebase -i origin/main
git stash pop
git add -p
git commit --amend
git rebase --continue