要嘗試一個特性分支,我把它推到Heroku的主(因爲這是它使用爲您的網站的唯一分支機構),也就是我所做的:如何在您推送功能分支時將您的本地主分支推送到Heroku?
git push heroku feature-foo:master
同時,我做了一些提交到我的本地主分支。現在,我希望把我的本地主人回給Heroku的,但我越來越:
To [email protected]:foo-repo.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:foo-repo.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.
這是有道理的,因爲確實Heroku的主人真的是我的特點,富分支,從而領先高手。但我不想從Heroku中拉出和合並 - 因爲這與合併我的feature-foo分支是一樣的,我不想這樣做。現在,我只是想推我的本地主沒有feature-foo提交。 (的確,我已經使用了heroku rollback
,以便功能-foo的更改不在網站上生效。)
我該怎麼做?
是的,事實證明,git並不是一個特別好的部署工具。使用git部署到heroku通常涉及到你不想用真正的git倉庫來做的事情。 – Fitzsimmons 2013-04-08 18:31:41