![](/img/trans.png)
[英]localstorage only stores one object instead of adding concatenating them
[英]Git adding only one of my folders instead of all of them
我有一个节点和反应项目。
我创建了一个名为 project 的文件夹,我的子文件夹是客户端和服务器
我在客户端运行 create-react-app,在服务器运行 npm init -y
在项目目录中时
我 git 初始化
然后 git 添加。
我收到此错误
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.
我的客户端文件夹中没有任何内容提交。
请帮忙。
编辑:我基本上在同一个文件夹中有两个 git 初始化。 为了解决这个问题,我只需要删除其中一个初始化。 我通过启用查看我的隐藏文件并删除其中一个.git 文件来做到这一点。
create-react-app
会自动为你初始化git
。 如果您在 Windows、Go 上查看并启用查看隐藏文件的选项。 在 Linux 上,如果我没记错的话,你已经可以看到目录了。 然后在您的client
目录中,删除.git
文件夹。
现在,您可以在根目录中(即project
目录)中进行git init
,并且您对 go 很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.