git 重命名分支

总共分 4 步:

# 修改本地分支
git branch -m dev ringsaturn/dev

# 删除远端
git push —delete origin dev

# 将本地的分支推上去
git push origin ringsaturn/dev

# 将本地分支的远端设置为新的分支
git push --set-upstream origin ringsaturn/dev

References: How do I rename a local Git branch? - Stack Overflow

Thanks to Mr Xu

Comments
Write a Comment