(GitHub推送)更新被拒绝,因为当前分支的尖端在后面

时间:2020-01-12 22:34:26

标签: github version-control

我正在尝试将一个存储库推送到不幸的是从我的文本编辑器中的客户端断开的存储库。

出现的错误是:

! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/jboyle1/milestoneproject-004.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

所以我尝试:

git pull repo_name

但是它说:

remote: Repository not found.

它可能是一个简单的修复程序,但我正在努力。

1 个答案:

答案 0 :(得分:0)

应该简单地是git pull(或git pull origin master

检查git remote -v的输出,并查看“ origin”是否确实引用了远程存储库URL。