推送到git

时间:2015-11-03 21:45:07

标签: wordpress git

我在尝试推送到wordpress git repo时遇到non-fast-forward错误,但是像错误消息那样拉动会给我一条消息,说明一切都是最新的。这是在拉,合并和提交之后。这是我的日志:http://pastebin.com/6M4qLqjG

简而言之,我试图推动:

ajh$ git push staging master

我收到此错误,告诉我先拉:

To git@git.wpengine.com:staging/gordo.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@git.wpengine.com:staging/gordo.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

但如果我试图拉,它会说它是最新的:

ajh$ git pull staging master
From git.wpengine.com:staging/gordo
 * branch            master     -> FETCH_HEAD
Already up-to-date.

这将循环,不知道发生了什么。任何想法我可以做什么来git我的回购和本地排队?我以前从未见过这个non-fast-forward错误,不知道该怎么做。它也告诉我结账主人,但我只是拉和主人合并所以我不认为我应该再试一次。

=========使用fix进行编辑============ 这是一个带有终端命令的pastebin,我用它来正确地推送东西。我仍然可以使用关于究竟发生了什么的解释。我可以复制这些步骤,但我不明白为什么它们有效,而常规的推/拉没有。

http://pastebin.com/u9DAiU5P

基本上我创建了一个新的分支,从主人那里检出,它快速转发给我。在我必须推动git push staging staging的地方发生了一些奇怪的事情,其中​​的分支令人困惑

0 个答案:

没有答案