Skip to content

外卖卷:非常划算 扫码领劵 省点小钱钱

0

文章发布较早,内容可能过时,阅读注意甄别。

Git修改分支名

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

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

  1. 修改本地分支名
sh
git branch -m oldBranchName newBranchName
  1. 删除远程分支
sh
git push origin :oldBranchName
# 或者 git push origin --delete oldBranchName
  1. 改名后的本地分支推送到远程
sh
git push --set-upstream origin newBranchName
最近更新

评论