2014-11-05 41 views
1

我做經過了分公司,試圖將越來越

git checkout someoldhash 
git checkout -b rollback_branch 
git remote add heroku [email protected]:myapp.git 
git push heroku rollback_branch:master --force 

fetching repository, done. 
error: src refspec rollback_branch does not match any. 
error: failed to push some refs to '[email protected]:myapp.git' 

但我可以做

git push github someoldhash 

,它工作正常。

如何將我的分支回滾到Heroku?

+0

你試過git push --force heroku HEAD:master? – VonC 2014-11-05 08:35:10

+0

我會嘗試一下,你能解釋一下這個區別嗎? – quantumpotato 2014-11-05 15:53:19

+0

嘿,那有效。有什麼區別? – quantumpotato 2014-11-05 15:54:08

回答

0

這可能工作:

git push --force heroku HEAD:master 

這將推動通過提交HEAD引用,而無需檢查的分支名稱。