如何在rails项目的主分支上关闭时钟?

时间:2017-12-11 19:55:10

标签: ruby-on-rails git

我与我的主分支合并,打破了我的rails应用程序的生产版本。问题是我不知道如何撤消一些rails操作,所以我想使用旧的分支作为新的master。感谢

1 个答案:

答案 0 :(得分: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