当前位置:   article > 正文

git远程操作报错git branch --set-upstream-to=origin/<branch> master

git branch --set-upstream-to=origin
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> master

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

在这里插入图片描述

解决方法:

git branch --set-upstream-to=origin/master  master 
  • 1

这是因为没有指定分支到git仓库上,想要使用git pull 和 git push命令来操作就要设置一下分支的信息。

如果还提示出来这个问题 fatal: branch ‘master’ does not exist

原因

出现这个问题原因就是本地没有 master 分支导致的。

输入 git branch -a。发现只有远程分支。

解决

解决方式就是:输入 git checkout master。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/694453
推荐阅读
相关标签
  

闽ICP备14008679号