【问题标题】:I'm new at GitHub and always get an error [duplicate]我是 GitHub 的新手,总是收到错误 [重复]
【发布时间】:2014-12-12 10:18:51
【问题描述】:

我是 GitHub 的新手,总是收到一个错误。当从我的 shell 中发送“git push”时: 错误: "master -> master(不允许浅更新) 错误:未能将一些引用推送到 git@github.com/myuser/myproject.git"

我真的不明白这一点。我想第一时间推送到 GitHub。在我创建存储库和 ssh-key 之前。

我使用的是 Windows 8.1 和 GitHub Bash shell(git 版本 1.9.4 msysgit 2)。

【问题讨论】:

  • 您是先initiate GitHub 中的存储库吗?如果是这样,您是否在本地克隆了 repo?
  • 我不知道你所说的“在 GitHub 中启动存储库”是什么意思。我已经创建了存储库并用“git clone github.com/myuser/myproject.git”克隆了它,我什至不知道什么是浅克隆。我的文件不在线。

标签: git github


【解决方案1】:

t5538-push-shallow.sh 表明此错误消息应仅在 git clone --depth x 之后出现。

再试一次:

git clone git@github.com/myuser/myproject.git
cd myproject
// edit a file
git add .
git commit -m "First modif"
git push

【讨论】:

    猜你喜欢
    • 2020-07-13
    • 2020-07-10
    • 1970-01-01
    • 2022-01-20
    • 1970-01-01
    • 2020-04-14
    • 2014-01-10
    • 1970-01-01
    • 2021-01-20
    相关资源
    最近更新 更多