首页 > 编程知识 正文

git新建分支详细步骤,git新建分支基于master

时间:2023-05-05 10:53:03 阅读:242339 作者:933

git 新建分支后,当执行git pull 拉代码的时候会报错

Remote origin did not advertise Ref for branch 0404birthday. This Ref may not exist in the remote or may be hidden by permission settings.

git 命令行提示内容如下:

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> 0404birthday

就是需要指定本地projet分支,跟远程仓库项目分支之间的关系,比如,我们需要本地master对应远程的master

git branch --set–upstream master origin/master

我新建一个 0404birthday分支 需要和远程日常开发的分支相连接

执行命令:

git branch --set-upstream-to=origin/develop 0404birthday
git pull

OK

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。