开发者

git non-fast-forward error [duplicate]

This question already has answers here: rejected master -> master (non-fast-forward) (24 answers) Closed 1 year ago.

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 er开发者_开发技巧ror:

To 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 (e.g. 'git pull') before pushing again.  See the 'Note about fast-forwards' section of 'git push --help' for details.

Yet, when I do a pull, I get repo up to date. Please help, I cannot integrate my work.


git push --force

"Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. This flag disables the check. This can cause the remote repository to lose commits; use it with care."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜