Sometimes rhere are some dot-dirs that you would like to search, but ag doesn't seem to search on them by default.
For example, I'd like to always search my .config directory.
Solution
You need to understand the difference between --hidden and -u, this might be what you want:
Add /.git/
in your ~/.agignore
file.
When using ag -u
will search every file including git directories, and ag --hidden
will search hidden files, but still stay out of .git directories and everything mentioned in .gitignore.