folder with dot in the name is not ignore

3,912 views
Skip to first unread message

Mathieu CLAVEL

unread,
May 3, 2011, 2:59:36 PM5/3/11
to msysGit
Hello,

I'm using Git on a project on Windows XP (I used Git-1.7.4-
preview20110204.exe to install Git, I'm using bash).
In the project hierarchy, I have a folder with a dot in its name :
oav/src/main/webapp/oav.Statistiques/
In my exclude file, I have that same line : oav/src/main/webapp/
oav.Statistiques/
My relative path is ok, other ignored folder are hided.
When I use 'git status', files from that folder are shown :

$ git status
# On branch utilisateurs_IT
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified: oav/src/main/webapp/oav.Statistiques/hosted.html
# modified: oav/src/main/webapp/oav.Statistiques/
oav.Statistiques.nocache.js
# [...]
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# [...]
no changes added to commit (use "git add" and/or "git commit -a")

Regards,

Mathieu

Johannes Sixt

unread,
May 3, 2011, 4:18:27 PM5/3/11
to Mathieu CLAVEL, msysGit
Am 03.05.2011 20:59, schrieb Mathieu CLAVEL:
> Hello,
>
> I'm using Git on a project on Windows XP (I used Git-1.7.4-
> preview20110204.exe to install Git, I'm using bash).
> In the project hierarchy, I have a folder with a dot in its name :
> oav/src/main/webapp/oav.Statistiques/
> In my exclude file, I have that same line : oav/src/main/webapp/
> oav.Statistiques/
> My relative path is ok, other ignored folder are hided.
> When I use 'git status', files from that folder are shown :
>
> $ git status
> # On branch utilisateurs_IT
> # Changes not staged for commit:
> # (use "git add <file>..." to update what will be committed)
> # (use "git checkout -- <file>..." to discard changes in working
> directory)
> #
> # modified: oav/src/main/webapp/oav.Statistiques/hosted.html
> # modified: oav/src/main/webapp/oav.Statistiques/
> oav.Statistiques.nocache.js
> # [...]

This is because you have the file already tracked. The excludes file
(and .gitignore) applies only to untracked files. You cannot use it to
tell git to ignore changes in files that it already tracks.

-- Hannes

Mathieu CLAVEL

unread,
May 4, 2011, 9:42:00 AM5/4/11
to msysGit
Thanks, it was that.
I solved it with a rm --cached then a commit.

-- Mathieu
Reply all
Reply to author
Forward
0 new messages