Git 本地新建,删除分支并推送到远程仓库
Posted Veryvalley
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git 本地新建,删除分支并推送到远程仓库相关的知识,希望对你有一定的参考价值。
在本地新建一个分支: git branch newBranch 切换到你的新分支: git checkout newBranch 创建并切换到新分支: git checkout -b newBranch 将新分支发布在github上: git push origin newBranch 在本地删除一个分支: git branch -d newBranch 在github远程端删除一个分支: git push origin :newBranch (分支名前的冒号代表删除) 直接使用git pull和git push的设置 git branch --set-upstream-to=origin/master master git branch --set-upstream-to=origin/ThirdParty ThirdParty git config --global push.default matching
以上是关于Git 本地新建,删除分支并推送到远程仓库的主要内容,如果未能解决你的问题,请参考以下文章