0

What rules should i add to .gitignore to ignore all error_log.txt files generated in php?

I have tried adding simply error_log to it, but it doesn't seem to work.

Im working on a Win7 x64 and i am new to Git.

Philipp
  • 64,526
  • 9
  • 115
  • 146
Tudor Ravoiu
  • 2,061
  • 7
  • 32
  • 53

1 Answers1

0

To ignore a file (like error_log.txt) in all directories of your repository, you should add the following rule to the .gitignore in the root folder of your repo:

error_log.txt

As said, that will ignore all files called error_log.txt in all directories and subdirectories of the repo.


Be aware, that .gitignore does only ignore files that are not tracked yet. If you have added and commited a error_log.txt already, that file will stay tracked. See Ignore files that have already been committed to a Git repository for futher detail on that.

Community
  • 1
  • 1
functionpointer
  • 1,381
  • 1
  • 12
  • 18