2013-03-12 51 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