make git branch the master branch

这一生的挚爱 提交于 2019-12-18 13:29:27

问题


My master branch is so different than my development branch that I would like it to just become my master branch without having to do a merge, is this possible? Seems like I could walk into a lot of work if I just try and do a merge.


回答1:


If you just have one copy of the repo, you could just delete your master branch, create a new branch from your dev branch called master, but you will have to notify others that you have changed the branch if there are other copies of the repo you don't control.

git checkout -b dev
git branch -D master
git checkout -b master


来源:https://stackoverflow.com/questions/4570590/make-git-branch-the-master-branch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!