threads / discuss / 28351

.gitignore don't ignore a file

Subject: .gitignore don't ignore a file

## tl;dr

2 messages between Sep 10, 2011 and Sep 10, 2011.

replies: 1people: 2as markdown or json

Bastien Sevajol· Sep 10, 2011, 10:29 UTC · lore

Hello ! I don't understand why my gitingnore don't want to ignore a file. I have this in my gitignore:

Show 8 quoted lines
> app/cache/
> app/logs/
> app/logs/dev.log
> app/logs/prog.log
> app/logs/test.log
> *.log
> *.*~
> nbproject
i've try with app/logs/.gitignore with this:
> dev.log
But, git don't ignore app/logs/dev.log :/

Do you now why ? thank's =)

bux.
Gustaf Hendeby· Sep 10, 2011, 11:01 UTC · re: Bastien Sevajol · lore

Re: .gitignore don't ignore a file

Hi!
On 09/10/2011 12:29 PM, Bastien Sevajol wrote:
Show 21 quoted lines
> Hello !
> I don't understand why my gitingnore don't want to ignore a file.
> I have this in my gitignore:
> 
>> app/cache/
>> app/logs/
>> app/logs/dev.log
>> app/logs/prog.log
>> app/logs/test.log
>> *.log
>> *.*~
>> nbproject
> 
> i've try with app/logs/.gitignore with this:
> 
>> dev.log
> 
> But, git don't ignore app/logs/dev.log :/
> 
> Do you now why ?
> thank's =)

Is the file currently committed (or staged) to your repository? In that case; Git never ignore files that are put under version control. If not, could you please elaborate a bit more on in what way the file is not ignored. It is not completely clear to me what you expect, and what in fact happens.

/Gustaf

← back to recent threads