【问题标题】:Unable to push to heroku after removing submodule删除子模块后无法推送到heroku
【发布时间】:2015-10-11 07:28:28
【问题描述】:

我从我的代码中删除了一个子模块,当我现在尝试推送到 heroku 时,我得到:

remote: Git submodules detected, installing:
remote: No submodule mapping found in .gitmodules for path 'submodule/path'
remote:
remote: ! Push rejected, submodule install failed
remote:

我正在使用 Heroku 的 buildpack:https://github.com/heroku/heroku-buildpack-multi.git

有了这个.buildpacks 文件:

https://github.com/ello/heroku-buildpack-imagemagick-cedar-14
https://github.com/heroku/heroku-buildpack-ruby.git

我可以做些什么来解决这个问题吗?我是否只需要删除这个应用程序并启动一个新应用程序(这显然是非常不可取的)。

【问题讨论】:

    标签: git heroku git-submodules


    【解决方案1】:

    您可以使用heroku-repo 插件重置应用程序的存储库:

    $ heroku plugins:install https://github.com/heroku/heroku-repo.git
    $ heroku repo:reset -a APP
    

    然后你可以再次部署:

    $ git push ....
    

    【讨论】:

    • 如果您在执行第一个命令时遇到问题,请尝试“heroku plugins:install heroku-repo”。
    • 好答案。看起来新方法是heroku builds:cache:purge -a APPgithub.com/heroku/heroku-repo#reset
    • builds:cache:purge 现在似乎不存在,并且 repo:purge_cache 没有为我解决子模块问题。重置确实
    猜你喜欢
    • 2020-06-09
    • 1970-01-01
    • 2016-12-14
    • 1970-01-01
    相关资源
    最近更新 更多