简体   繁体   English

git non-fast-forward错误

[英]git non-fast-forward error

I've reverted to a previous version of my commit then I've done some other commits but without pushing to the remote repo. 我已还原到先前的提交版本,然后执行了其他一些提交,但未推送到远程存储库。

When I do push I got the following error: 当我进行推送时,出现以下错误:

To git@xxxxxx ! 到git @ xxxxxx! [rejected] REPO -> REPO (non-fast-forward) error: failed to push some refs to '.....' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (eg 'git pull') before pushing again. [拒绝] REPO-> REPO(非快速转发)错误:未能将某些引用推送到“ .....”。为防止丢失历史记录,非快速转发更新被拒绝。合并远程更改(例如'git pull'),然后再次推送。 See the 'Note about fast-forwards' section of 'git push --help' for details. 有关详细信息,请参阅“git push --help”中的“关于快进的注意事项”部分。

Yet, when I do a pull, I get repo up to date. 但是,当我进行拉动时,会得到最新的回购。 Please help, I cannot integrate my work. 请帮助,我无法整合我的工作。

git push --force

“通常,该命令拒绝更新不是用于覆盖它的本地引用的祖先的远程引用。此标志禁用该检查。这可能导致远程存储库丢失提交;请谨慎使用。”

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

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