目录

Git修改分支名

# 同时修改本地分支名和对应的远程分支名

修改前要确保本地分支的代码是最新的,并且修改后不会影响到同事的代码。

  1. 修改本地分支名
git branch -m oldBranchName newBranchName
1
  1. 删除远程分支
git push origin :oldBranchName
# 或者 git push origin --delete oldBranchName
1
2
  1. 改名后的本地分支推送到远程
git push --set-upstream origin newBranchName
1
更新时间: 2024/01/17, 05:48:13
最近更新
01
JVM调优
12-10
02
jenkins
12-10
03
Arthas
12-10
更多文章>