`git status`声称工作树是干净的(=没有修改过的文件),仍然`git add *`添加了两个目录

时间:2017-05-22 09:39:44

标签: git

我的机器发生了奇怪的事情:

git status声称工作树很干净。

manuel@manuelthinkpad:~/projects/PROJECTNAME/modules/MODULENAME$ git status
On branch BRANCHNAME
Your branch is up-to-date with 'origin/BRANCHNAME'.
nothing to commit, working tree clean

Still git add *添加了两个目录:

manuel@manuelthinkpad:~/projects/PROJECTNAME/modules/MODULENAME$ git add *
manuel@manuelthinkpad:~/projects/PROJECTNAME/modules/MODULENAME$ git status
On branch BRANCHNAME
Your branch is up-to-date with 'origin/BRANCHNAME'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   dir1
    modified:   dir2

git diff --cached未提供有关这些更改的任何详细信息。

manuel@manuelthinkpad:~/projects/PROJECTNAME/modules/MODULENAME$ git diff --cached
manuel@manuelthinkpad:~/projects/PROJECTNAME/modules/MODULENAME$ 

谁能告诉我这里发生了什么?如何让git告诉我它为什么添加这些目录?

我读了一些与CRLF相关的问题,但如果我正确读取git config --list,则不会激活此CRLF-ignore功能。 (我从此列表中删除了* .url,* .fetch,* .remote和* .merge条目。)

user.name=xxx
user.email=xxx
diff.tool=meld
difftool.prompt=false
difftool.meld.cmd=meld $LOCAL $REMOTE
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.worktree=../../../../xxx

0 个答案:

没有答案