Last Updated: February 25, 2016
· aaronmiler

Roll Back Git Repo

We like to use Heroku as a staging environment in my office. However, Heroku only accepts pushes from the Master branch, so when we moved off Heroku our commit history was a mess.

After branching off and pushing a new branch off Master, this nice little command helped me roll back the master branch to a more stable point, and sync it up with our production environment

git push -f <remote> <commit-hash>:<branch>