我有一个名为 ld 的 repo 和一个名为 ldapp 的子模块,这是一个 Django 项目。我想将 Django 项目 ldapp 推送到 elastic beanstalk,但在运行 eb init
时收到以下警告:
Warning: Your directory has not been initialized as a Git repository. To create a local Git repository, run "git init" and then re-run the "eb init" command.
如果我继续运行 eb push
我会得到:
git: 'aws.push' is not a git command. See 'git --help'. Cannot run aws.push for local repository HEAD:
git 构造子模块的方式实际上是子模块的 .git 是一个文件,而不是一个目录。以下是文件 ldapp/.git 的内容:
gitdir: ../.git/modules/ldapp
此文件告诉 git 从 ld 的 .git 目录 中检索 ldapp 的版本。由于 ldapp 的 .git 版本控制不存在于 ldapp 本身中(而是存在于 ld 的 .git 中),运行 eb init
和 eb push
失败。我该如何解决?
最佳答案
我认为你做不到。我必须 git clone
子模块才能取回独立的 Git 存储库。
关于django - 如何将 git 子模块推送到 AWS Elastic Beanstalk?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29246750/