git新增远程分支

  1. 切换到被copy的分支(master),并且从远端拉取最新版本

git checkout master

git pull

  1. 从当前分支拉copy开发分支

git checkout -b develop

  1. 把新建的分支push到远端
    git push origin develop

  2. 拉取远端分支
    git pull

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> develop

经过验证,当前的分支并没有和本地分支关联,根据提示进行下一步:

  1. 关联
    git branch --set-upstream-to=origin/develop
  2. 再次拉取 验证
    git pull
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容