#1885·fd

--override-ignore flag to selectively bypass .gitignore

Author: benodiwalCreated Feb 17, 2026Updated Jul 15, 2026
Labelsfeature-request

Currently, fd respects .gitignore rules (great for most searches), but sometimes you need to find files inside gitignored directories like node_modules, build, or .cache. The only option today is --no-ignore / -I, which disables all ignore rules.

This forces users into an awkward workaround, disabling all ignores and then manually re-excluding every other pattern from .gitignore:

bash
# Just want to search inside node_modules, but .gitignore also has
# build/, dist/, *.pyc, .env*, coverage/, .cache/, tmp/ ...
# Now you have to re-add ALL of them as --exclude:
fd -I --exclude build --exclude dist --exclude '*.pyc' \
     --exclude '.env*' --exclude coverage --exclude .cache \
     --exclude tmp pattern

This is tedious, error-prone, and breaks every time .gitignore changes.

Proposed Solution

Add --override-ignore <pattern> flag that force-includes entries matching the given glob pattern, even when they'd be excluded by .gitignore, while keeping .gitignore active for everything else.

bash
  # Instead of the mess above, just:
  fd --override-ignore node_modules pattern