错误:即使没有冲突,也无法将某些引用推送到[remote]

时间:2018-06-19 08:41:41

标签: git github push git-merge

git push origin <remote/branch>给了我

To github.com:<remote/branch>
 ! [rejected]        feature/branch001-> feature/branch001 (non-fast-forward)
error: failed to push some refs to 'git@github.com:<remote/branch>'
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 origin <remote/branch>时,我得到了

Merge made by the 'recursive' strategy.

在推送到github之后,这个合并提交根本没有显示更改的代码 - +0 −0

为什么git会拒绝推送?

1 个答案:

答案 0 :(得分:0)

仅尝试git pull。看,如果行得通。

注意:如果您已经命名了来源,则只需运行git pull而无需命名来源。如果您在分支机构,则可能必须输入git pull origin branchname