I did a commit in my local branch.
Then I realised that I committed a file by mistake.
So I did:
git reset --soft HEAD~1
git restore --staged filename.txt
Then by mistake I did git commit --amend
I realised that my changes would be merged to the previous commit so when the editor was opened I removed the messages but because I pressed save instead of quit my changes were merged to the previous commit.
Is there a way to fix the mistake or I need to do it manually? In case it helps the previous commit is a merge commit and git show
does not show any code for that