Reactjs can';t将create react应用程序内容添加到repo
我正在尝试创建react应用程序,我有一个nodejs(express)后端 这里有一个链接到 正如您在repo中看到的,文件客户端是空的 我无法添加(暂存)客户端文件 当我执行Reactjs can';t将create react应用程序内容添加到repo,reactjs,git,github,Reactjs,Git,Github,我正在尝试创建react应用程序,我有一个nodejs(express)后端 这里有一个链接到 正如您在repo中看到的,文件客户端是空的 我无法添加(暂存)客户端文件 当我执行git添加时。然后git状态 我得到以下信息 On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "
git添加时。
然后git状态
我得到以下信息
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in
submodules)
modified: client (modified content, untracked content)
modified: package.json
no changes added to commit (use "git add" and/or "git commit -a")
试着执行
git-rm-rf——缓存客户端
及
git添加客户端
在客户端目录中。在
git add.
之后,您是否尝试过git commit-m“message”
?是的,我这样做了,但是当我转到github时,我看到客户端文件为空,您可以执行“ls-al”吗命令和更新问题?客户端目录中是否有任何文件?我克隆了repo并执行了:git rm-r——缓存的客户端
git add.
和git从客户端目录中获取文件。因此,可能需要从项目中复制文件(无法添加的文件),删除存储库,请再次克隆并执行我发出的命令。是的,我的问题已解决。我按以下特定顺序运行这些命令:git rm-rf——缓存客户端
,然后cd客户端
rm.git
git add.问题已解决,谢谢:)所以请将问题标记为已回答。在我的答案旁边打勾。不客气:)
total 55
drwxr-xr-x 1 user 197121 0 Jun 20 16:38 ./
drwxr-xr-x 1 user 197121 0 Jun 20 15:11 ../
drwxr-xr-x 1 user 197121 0 Jun 21 10:24 .git/
-rw-r--r-- 1 user 197121 15 Jun 20 15:18 .gitignore
drwxr-xr-x 1 user 197121 0 Jun 20 15:57 client/
drwxr-xr-x 1 user 197121 0 Jun 20 15:14 node_modules/
-rw-r--r-- 1 user 197121 362 Jun 20 17:14 package.json
-rw-r--r-- 1 user 197121 14290 Jun 20 15:14 package-lock.json
-rw-r--r-- 1 user 197121 389 Jun 20 15:17 server.js