“没有提交(工作目录干净)”当一个文件夹已被添加 [英] "nothing to commit (working directory clean)" when a folder has been added

查看:144
本文介绍了“没有提交(工作目录干净)”当一个文件夹已被添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在git中遇到问题。我不知道为什么它说没有提交(工作目录干净)。



我的开发环境:CentOS 6.4



我的流程如下:


  1. mkdir develop

  2. cd develop

  3. git init(set user.name,user。电子邮件)

  4. git remote add originrepository_name

  5. git clonerepository_name

  6. 添加Test文件夹

    (amon2 -setup.pl --flavor = Basic Test)

  7. 在这一点上,我可以看到Untracked files ~~ Test /
  8. cdTest folder
  9. li>
  10. 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:

  1. mkdir develop
  2. cd develop
  3. git init(set user.name, user.email)
  4. git remote add origin "repository_name"
  5. git clone "repository_name"
  6. Add "Test" folder
    (amon2-setup.pl --flavor=Basic Test)

  7. git status -> at this point, i can see "Untracked files ~~ Test/"

  8. cd "Test" folder
  9. git 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆