I pushed a commit to a repo where I accidentally added a file. Nobody else has merged from the remote repo so I can rewrite history. But when I remove file(unstage, not remove f
If you need to rewrite the full commit, try to use
git reset HEAD^ git add # or git add -pu git commit -C
Before doing this you will need to keep the last commit number to able to reuse the commit message/date/author.