2

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

John Szakmeister
  • 44,691
  • 9
  • 89
  • 79
user2711253
  • 43
  • 1
  • 6

1 Answers1

1

The gray folder for Test means:

http://www.fastpic.jp/images.php?file=4456741517.png

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)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thanks VonC. but why submodule... i did do git remote add git@~~ i didn't type commands contains "submodule". – user2711253 Oct 02 '13 at 07:25
  • 2
    You didn't, but either your repo already contain a submodule, or the Amon2 setup process creates one. In any case, avoid having a `test` and a `Test` with different case. On Windows, this will lead to trouble. – VonC Oct 02 '13 at 07:27