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>
Written by Aaron Miler
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#