【问题标题】:error: failed to push some refs to 'origin' [duplicate]错误:未能将一些引用推送到“原点”[重复]
【发布时间】:2021-04-16 12:58:39
【问题描述】:

此命令git push -u origin master 输出以下错误:

error: failed to push some refs to 'origin'

error: src refspec master does not match any

我也试过这个:

git add .
git commit -am "initial commit"
git push -u origin master

然后输出:

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

【问题讨论】:

  • @phd:根据他在我的回答下的评论,他确实有渊源。 Sibasankar 应该edit 这个问题来反映这一点。
  • @DaemonPainter 是的,链接的 dup 正好回答了这个问题。 Sibasankar 应该在询问之前进行搜索。
  • 但解决方案是添加原点。他已经来源,请参阅我的回答下的评论。

标签: git git-push


【解决方案1】:

你没有出身。运行git remote 来证明[ref]。

使用git remote add origin <path to remote repository> 添加新的原点。

【讨论】:

  • (envy) E:\Python-practice\MyDojo>git remote origin (envy) E:\Python-practice\MyDojo>git remote add origin E:/Python-practice/MyDojo/.git /错误:远程来源已经存在。这就是我得到的。来源已经存在。
  • 所以您在系统的其他地方使用本地远程。确保/\ 没有碰撞并导致问题,好吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-07-29
  • 2022-01-25
  • 2019-07-29
  • 2021-02-12
  • 2020-12-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多