繁体   English   中英

Git-无法推送,提交后无法拉动

[英]Git - Unable to push, unable to pull after commit

我正在提交和推动更改。 更改已成功提交。 然后,我试图推动它失败。

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin mpgf:mpgf
Pushing to https://github.com/XXXXXXXXX

To https://github.com/XXXXXXXXX
 ! [rejected]        mpgf -> mpgf (non-fast-forward)
error: failed to push some refs to 'https://github.com/XXXXXXXXX'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')

hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

然后,我尝试拉(现在我看到有一些更改),但失败了:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin mpgf
You have not concluded your merge (MERGE_HEAD exists).

Please, commit your changes before you can merge.

Completed with errors, see above.

发生这种情况的原因是什么,我应该采取什么步骤小心地进行更改?

PS现在,我看到有一些更改需要执行,有1项更改需要执行。

您可以打开一个新分支,该分支将跟踪要提取的远程分支(使用“ git branch --track”)。然后从远程提取更改。 然后在原始分支上签出并将新分支合并到其中。 现在,您的远程分支机构和本地分支机构相等,您可以进行推送。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM