I think that heroku is not allowing you to rewrite
the history. When you are working on remote branches you shouldn't use reset
or rebase
. By using
git revert HEAD~2..HEAD
2 new commits will be created reverting the changes from the last 2 commits. This also prevents merging conflicts for your co-workers.