How to force push a reset to remote repository?

The message means that you’re not allowed to do non-fast-forward push.

Your remote repository has most likely denyNonFastforwards = true in its config. If you change that, git push --force should work.

To change the setting, you need access to the machine with the remote repository. From there, do git config receive.denynonfastforwards false.

Leave a Comment