2013-03-12 56 views
3

您好我试图把我的本地更改Heroku的生产,但我收到以下错误试图混帐推到远程分支时收到错误(Heroku的)

Zhens-MacBook-Pro:Dailymuses-Server-Side zaikshev88$ git push heroku-production master:master 
To [email protected]:dailymuses.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to '[email protected]:dailymuses.git' 
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. 

这里的问题是,当我试图做一个混帐拉,我被告知,一切都是最新的

Zhens-MacBook-Pro:Dailymuses-Server-Side zaikshev88$ git pull origin master 
From github.com:mingyeow/Dailymuses-Server-Side 
* branch   master  -> FETCH_HEAD 
Already up-to-date. 

这是什么问题,我该如何解决它?

回答

10

您的push命令是远程的heroku-production,但您的pull命令是originnon-fast-foward消息表示您当前回购的历史记录与Heroku遥控器的历史记录不同;可能有人推动了一个分支进行了一些合并或重组。

我恳请您不要使用Heroku作为权威的git remote。假设你不是,你可以强制推翻Heroku主分支来解决这个问题。

git push -f heroku-production master:master