如果我强制推送比头更早的提交,它就可以了。如果我试着推动头脑,我被告知一切都是最新的。为什么?这是一个普通的git问题,还是heroku独有的?第二个命令实际上是
吗?# this works, as expected git push heroku develop:master ... # then, this doesn't work, as expected git push heroku develop:master Everything up-to-date # then, pushing an older commit works, as expected git push heroku a1b2c3d4:master ... # then, this fails. why?! :-( git push heroku develop:master Everything up-to-date
答案 0 :(得分:0)
你有没有将旧提交推送给Heroku?我认为你没有,因为Heroku可能在提交ID上确定它是否收到了版本。 这个假设可以通过以下步骤来验证:
1. git push heroku develop:master => our starting point
2. Change and commit => Rev A
3. Change and commit => Rev B
4. git push heroku develop:master => Rev B known to Heroku
5. Change and commit => Rev C
6. git push heroku develop:master => Rev C known to Heroku
7. git push heroku Rev A:master => this should work as unknown to Heroku
8. git push heroku Rev B:master => this should not work as known to Heroku
9. git push heroku develop:master => we know this doesn't work
无论如何,你可以来回滚动 https://devcenter.heroku.com/articles/releases#listing-release-history 和 https://devcenter.heroku.com/articles/releases#rollback