“没有提交(工作目录干净)”当一个文件夹已被添加 [英] "nothing to commit (working directory clean)" when a folder has been added
问题描述
我在git中遇到问题。我不知道为什么它说没有提交(工作目录干净)。
我的开发环境:CentOS 6.4
我的流程如下:
-
mkdir develop
-
cd develop
-
git init(set user.name,user。电子邮件)
-
git remote add originrepository_name
-
git clonerepository_name
-
添加Test文件夹
(amon2 -setup.pl --flavor = Basic Test) 在这一点上,我可以看到Untracked files ~~ Test / -
cdTest
folder li> -
git status
- >在这一点上,没有提交(工作目录干净)
为什么这么说?如果我推测试,我的github推送的数据是子项目,所以我看不到测试文件夹的内容。为什么会这样?
Linux(坏) -
在记录该子模块的父回购索引中)
一旦进入 Test
(这是一个嵌套的git仓库),由于该仓库没有文件,git状态报告一个明确的索引。
还要注意Windows不区分大小写,所以' Test
'不会如果已经有'测试
'(小写字母)
I have a problem in git. I don't know why it says "nothing to commit (working directory clean)."
My development env: CentOS 6.4
My process is below:
mkdir develop
cd develop
git init(set user.name, user.email)
git remote add origin "repository_name"
git clone "repository_name"
Add "Test" folder
(amon2-setup.pl --flavor=Basic Test)git status
-> at this point, i can see "Untracked files ~~ Test/"cd "Test"
foldergit status
-> at this point, nothing to commit (working directory clean)
Why does it say this? And if i pushed "Test", my github pushed data has been "subproject," so, i can't see Test folder's contents. Why is that?
Linux(bad)
http://www.fastpic.jp/viewer.php?file=6541584337.png
add amon files from Linux(bad i can't open files)
http://www.fastpic.jp/viewer.php?file=4456741517.png
Windows(ok)
http://www.fastpic.jp/images.php?file=8061488422.png
add amon files from Windows(ok)
http://www.fastpic.jp/viewer.php?file=8164112210.png
The gray folder for Test means:
Test is added as a submodule, which is why git status in the parent repo reports that "Test" must be added (it is a special entry
in the index of the parent repo, which record that submodule)
Once in Test
(which is a nested git repo), since that repo has no file, the git status reports a clear index.
Note also that Windows isn't case sensitive, so 'Test
' wouldn't register properly, if there is already a 'test
' (lowercase)
这篇关于“没有提交(工作目录干净)”当一个文件夹已被添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!