git change branch name All In One
git change branch name All In One
1. Start by switching to the local branch which you want to rename:
$ git checkout <old_name>
# 2. Rename the local branch by typing:
$ git branch -m <new_name>
# 3. Push the <new_name> local branch and reset the upstream branch:
$ git push origin -u <new_name>
# 4. Delete the <old_name> remote branch:
$ git push origin --delete <old_name>
refs
修改 git 分支名称
https://linuxize.com/post/how-to-rename-local-and-remote-git-branch/
https://stackoverflow.com/questions/6591213/how-do-i-rename-a-local-git-branch
https://devconnected.com/how-to-change-branch-name-on-git/
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14451126.html
未经授权禁止转载,违者必究!