Search code examples
gitgitignoreglob

gitignore file type within root directory only


I'm trying to ignore all .log file types (ie foo.log) in the repository root directory ONLY.

Both *.log and /*.log match all files of that type within the root directory, but they also match recursively (ie /foo/bar/baz.log)

Note: I'm using git on windows (git extensions)

How do I match all files with a specific file type within the repository root directory ONLY?


Solution

  • This is a bug on git extensions:

    https://github.com/gitextensions/gitextensions/issues/1040