git - 删除子模块后无法推送到 heroku

标签 git heroku git-submodules

我从我的代码中删除了一个子模块,当我现在尝试推送到 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 的构建包: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

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

最佳答案

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

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

然后您可以再次部署:

$ git push ....

关于git - 删除子模块后无法推送到 heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31545902/

相关文章:

git - 如何从 Bitbucket 存储库推送到 Azure 存储库,不同的用户电子邮件

Heroku 和 Iris 沙发 vs Cloudant

java - 如何从我的数据库中的触发器调用 java 类?

git - 将 git 子模块添加到存储库的根目录中?

linux - 在具有相同顶级父目录的文件夹内使用多个 Git 存储库?

git - 如何列出包含给定提交的分支?

svn - git svn dcommit 没有 rebase

git submodule checkout 来自各自 Remote 的不同分支的最新提交

Git Rebase 还是 Git Merge?

php - 找不到类 'League\Flysystem\AwsS3v3\AwsS3Adapter'(Laravel + Heroku)