我想立即将包含子目录的目录从我的计算机推送到GitHub。
我的文件夹结构:
parent_folder
|_ child_folder_1
|_ child_folder_2
|_ etc
当我
git init
转到父文件夹并尝试
git add .
我发现了一个错误:
warning: adding embedded git repository: Child_folder_1
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 <url> Child_folder_1
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached Child_folder_1
hint:
hint: See "git help submodule" for more information.
这不仅发生在一个子文件夹上,而且发生在所有子文件夹上。这是因为子目录也包含git吗?那么我该怎么解决这个问题呢?
提前谢谢。