When i hit ‘git status’, it shows 2 folders that contains files that are tracked long time ago:
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# src/UI/Views/Shared/EditorTemplates/
# src/Web/helpers/
nothing added to commit but untracked files present (use "git add" to track)
Git GUI shows nothing as expected.
Using portablegit 1.7.1, but tried 1.7.0.2 – same results.
What can cause that?
$ cat .gitignore
.nu/*
lib/*
*~
*.swp
*.swo
*_ReSharper*
doc/*
RAPLM.suo
RAPLM.5.1.ReSharper.user
src/*/bin/*
src/*/obj/*
src/*/Debug/*
src/*/Release/*
src/Domain/unused
@Charles Bailey
lapsaarn@WW021198 /d/work/asdf (master)
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# src/UI/Views/Shared/EditorTemplates/
# src/Web/helpers/
nothing added to commit but untracked files present (use "git add" to track)
lapsaarn@WW021198 /d/work/asdf (master)
$ git add src/Web/helpers/
lapsaarn@WW021198 /d/work/asdf (master)
$ git add src/Web/helpers/*
lapsaarn@WW021198 /d/work/asdf (master)
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# src/UI/Views/Shared/EditorTemplates/
# src/Web/helpers/
nothing added to commit but untracked files present (use "git add" to track)
lapsaarn@WW021198 /d/work/asdf (master)
$
@Charles
$ git ls-tree -r HEAD | grep -i helpers
100644 blob 843de27f850308786140a7c09f67b5ef99184630 src/web/helpers/HtmlHelperExtensions.cs
Charles Bailey correctly diagnosed the problem in the comments: “
git add” on a case insensitive Os.It is linked to issue 286 of msysgit: “Case Sensitity of Directory Names”, and the issue remains (again, for directories) even if you set
core.ignorecaseto true.When you add “
src\Web” (with a capital ‘W‘), it won’t add anything if your index already contains “src\web” (lowercase ‘w‘).A patch was proposed but rejected:
So you need to:
Web‘ into ‘web‘ in your working directory (filesystem)web‘ into ‘Web‘ in the index (git mv src/web src/Web) in your index.