I accidentally committed an unnecessary large subfolder xxxxx in my repo, and when I realized this while pushing, I stopped the push midway through.
Then I removed a
Since the commit, that needs editing is on the head of branch, you probably can get away just with amending it. So do the git rm and then git commit --amend
git rm
git commit --amend
This will merge changes into most recent commit, instead of creating new one