4 ms·
Maybe I’m missing something, but doesn’t ripgrep ignore untracked files in git by default already?
by woodruffw 1y ago
Maybe I’m missing something, but doesn’t ripgrep ignore untracked files in git by default already?
- oever 1y agoThe point is to search hidden files that are tracked by git. An example is CI scripts which are stored in places like .woodpecker, .forgejo, .gitlab-ci-yml.
- burntsushi 1y agoOne thing you might consider to make this more streamlined for you is this: $ printf '!.woodpecker\n!.forgejo\n!.gitlab-ci-yml\n' > .rgignore Or whatever you need to whitelist specific hidden directories/files. For example, ripgrep has `!/.github/` in its `.ignore` file at the root of the repository[1]. By adding the `!`, these files get whitelisted even though they are hidden. Then `rg` with no extra arguments will search them automatically while still ignoring other hidden files/directories. [1]: https://github.com/BurntSushi/ripgrep/blob/38d630261aded3a8e535fe85761e68af35bc462d/.ignore https://github.com/BurntSushi/ripgrep/blob/38d630261aded3a8e...
- oever 1y agoThat's a great suggestion for .rgignore and ~/.rgignore.