$ git add . warning: adding embedded git repository: motion-promo-machine hint: You've…
- User
$ git add . warning: adding embedded git repository: motion-promo-machine hint: You've added another git repository inside your current repository. hint: Clones of the outer repository will not contain the contents of hint: the embedded repository and will not know how to obtain it. hint: If you meant to add a submodule, use: hint: hint: git submodule add motion-promo-machine hint: hint: If you added this path by mistake, you can remove it from the hint: index with: hint: hint: git rm --cached motion-promo-machine hint: hint: See "git help submodule" for more information.
- Assistant
The warning you are seeing is due to trying to add a nested Git repository (
motion-promo-machine) inside your current repository.This warning is informing you that if you continue with this setup, when someone clones the outer repository, it will not contain the contents of the embedded repository, and Git will not know how to obtain it.
If you intended to add
motion-promo-machineas a submodule, you should use the command:git submodule add <url> motion-promo-machineOn the other hand, if you added
motion-promo-machineby mistake, you can remove it from the index using:git rm --cached motion-promo-machinePlease note that removing the path from the index does not delete any files; it only removes them from being tracked by Git.