I have a repo named ld with a submodule named ldapp, which is a Django project. I want to push the Django project ldapp to elastic beanstalk, but I get the warning following warning when running 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.
If I continue on and run eb push I get:
git: 'aws.push' is not a git command. See 'git --help'. Cannot run aws.push for local repository HEAD:
The way git structures submodules is it actually has the .git of the submodule be a file, not a directory. The following is the contents of the file ldapp/.git:
gitdir: ../.git/modules/ldapp
This file tells git to retrieve ldapp's versions from ld's .git directory. Since the .git versioning of ldapp is not present within ldapp itself (but rather within ld's .git), running eb init and eb push fail. How do I fix this?
I don't think you can. I had to git clone the submodule to get back a standalone Git repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With