• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Gitpush分支报错fatal: The current branch 当前分支名 has no uphotoshoptream branch

武飞扬头像
一颗不甘坠落的流星
帮助5

报错信息

  • 示例代码:feature/file 是分支名
fatal: The current branch feature/file has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin feature/file
  • 中文释义:
推送错误:当前分支特性/文件没有上游分支。  
要推动当前分支并将远端设置为上游,请使用 :
git push --set-upstream origin feature/file

在于当前这个分支没有和任何的仓库发生关联,origin是仓库的一个指针,需要将当前的分支与这个指针之间形成关联。

解决方法

  • 直接允许以下命令即可
git push --set-upstream origin feature/file

执行之后会在github上自动新建一个 feature/file 的分支。

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhekeigg
系列文章
更多 icon
同类精品
更多 icon
继续加载