我正在尝试将React项目中的客户端文件夹提交到本地Git代码库,但一直收到以下错误:
% git add client
warning: adding embedded git repository: client
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> client
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached client
hint:
hint: See "git help submodule" for more information.我运行此命令来尝试删除当前的客户端存储库:
User@Users-MacBook-Pro final-9 % git rm --cached -f client
rm 'client'当我再次尝试git add client时,我在这篇文章的顶部得到了同样的错误信息。
发布于 2021-01-15 18:18:11
在命令行中输入"git add *“之后,删除你的cient文件夹中的.gitignore文件,它会好起来的!
https://stackoverflow.com/questions/65179283
复制相似问题