user6052428
user6052428

Reputation:

development.log is not affected by ignore

Part of my .gitignore looks like below:

## Ignore logs
/log/
/log/development.log

Yet development.log is always in modified files when commiting.

I tried to remove --cached and remove file altogether. No luck. Also I have recently pushed it to remote (by mistake).

Any idea how to solve that bugger once and for all?

Upvotes: 0

Views: 508

Answers (1)

lightalloy
lightalloy

Reputation: 1165

Try

log/*

(without leading slash)

And probably

git rm --cached log/development.log

to remove the file from index. You may also check this question How to make Git "forget" about a file that was tracked but is now in .gitignore? to remove accidentally commited log file.

Upvotes: 2

Related Questions