fatal: The current branch xiao has no upstream branch. To push the current branch and set the remote
程序员文章站
2022-03-07 10:25:18
...
场景:
使用git 的时候,git push
然后提示我以下错误
$ git push
fatal: The current branch xiao has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin test
以上,其实已经告诉我们问题出现的原因和解决方案了。
原因:在远端没有当前分支
解决方法: 使用它提示的语句。先提交一次git push --set-upstream origin test
把test 分支推到远端,然后再git push
(这是临时解决方法。长久的解决方案就是在git项目管理的远端配置ssh**,这样就不用每次新建一个分支的时候都这样操作一次了)
_
总结:
在使用git 命令的时候,在出现错误的时候,git 会提示问题出现的原因以及解决方案。所以大家认真读一读错误提示就能找到解决方案了哦。
上一篇: php调用自己的方法报错500
下一篇: php写入文件不覆盖
推荐阅读
-
fatal: The current branch master has multiple upstream branches, refusing to puh. git push error!
-
git push 报错fatal the current branch master has no upstream branch和Everything up-to-date
-
fatal: The current branch dev has no upstream branch. To push the current branch and set the remote
-
fatal: The current branch xiao has no upstream branch. To push the current branch and set the remote
-
fatal: The current branch master has no upstream branch. To push the current branch and set
-
解决Git建立远程分支关联时fatal the current branch master has no upstream branch 问题
-
git提示fatal the current branch master has no upstream branch 问题
-
fatal: The current branch venueCamera has no upstream branch. To push the current branch and set the
-
fatal: The current branch developer has no upstream branch.
-
push出现问题:fatal: The current branch master has no upstream branch.