0

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?

1 Answers1

2

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.

lightalloy
  • 1,165
  • 14
  • 16
  • 1
    I have used `git update-index --assume-unchanged ` mentioned in the thread that you have linked. For now looks like the problem is gone. Thanks. –  Aug 02 '17 at 19:39