【问题标题】:I renamed my repository and I am having trouble updating my files我重命名了我的存储库,但我无法更新我的文件
【发布时间】:2021-04-27 09:34:55
【问题描述】:

我收到的错误的终端截图:

在将所有内容都拉到本地驱动器后,我更新了 git hub 上的存储库名称。我现在无法使用更改更新我的本地驱动器。

当我输入命令时:

> git push origin master

我收到以下错误:

> error: src refspec master does not match any

> error: failed to push some refs to 'https://github.com/ktrudickm/Classwork.git'

我对此比较陌生,所以这可能很容易解决,但我有点卡住了。

【问题讨论】:

  • 你可能从来没有更新过你可以用git remote set-url ... 做的repo url。见github docs

标签: github repository rename


【解决方案1】:

存储库信息隐藏在项目的.git 文件夹中。打开 .git/config 并编辑 url 以匹配新的存储库。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-15
    • 1970-01-01
    • 2018-08-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多