2013-02-25 38 views
2

我有2个分支:开发,some_other_name。我已经将some_other_name分支作为开发的子分支到了heroku,我测试了我的代码,然后切换到开发,在dev分支中做了一些代码更改,但是当我试图将其推到heroku时,我得到了下一个:从另一个本地分支推送到heroku

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

这意味着我必须将我的some_other_name分支合并到开发中。有什么办法可以不合并这些分支,而只是推动开发呢?

回答

6

是的,你可以使用--force选项,当推送到heroku。

$ git push -f heroku development:master

+0

谢谢,这是我一直在寻找 – 2013-02-25 11:24:02

0

Heroku的建议的方法是使用localbranch:指挥大师格式:

git push heroku-staging develop:master 

--force可以工作,但它也是危险的。

相关问题