-2

I made a merge to my master branch that broke the production version of my rails app. The problem is that I do not know how to undo some of the rails actions made, so I would like to use an older branch as the new master. Thanks

BBigger
  • 1
  • 3

1 Answers1

0
git branch -m master master-backup
git push remote master              # delete master
git push remote master-backup       # create master-old on remote

git checkout older-branch           # checkout the branch which you wanted to be master

git checkout -b master              # create a new local master
git push remote master              # create master on remote
Kiran Dodani
  • 101
  • 5