Can Git delete the master branch and then set the currently used dev branch as master?
天蓬老师
天蓬老师 2017-05-02 09:24:44
0
2
577

Can Git delete the master branch and then set the currently used dev branch as master?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
Ty80

1. Merge with the master branch
2. If you really can’t merge with the master branch, you can only delete it
You already have the branch. You need to set your Dev branch as the default branch on the git main page before you can delete the master branch
Home page Face-enter the project main page-right navigation setting-left navigation branches-default branch-set default branch-then you can use git branch -d master to delete the master branch.

Reference link: https://matthew-brett.github.io/pydagogue/gh_delete_master.html

習慣沉默
  1. git checkout dev

  2. git merge master

  3. git brach -d master

  4. git branch -m dev master

  5. git push -f origin master

参考How to replace master branch in git

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template