git如何远程分支的名称

我使用了
git branch -m dev test,本地分支改为test了
但是上传完还是dev的远程分支,这个要怎么改呢?

阅读 1.6k
1 个回答

送你三句代码

git branch -m old_branch new_branch # Rename branch locally 
git push origin :old_branch # Delete the old branch 
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题