You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I manage my ~/ directory dotfiles with git. And thus, I have a special ~/.gitignore that excludes everything but dotfiles [1].
Sooooo what happens is when I use rg, it never finds anything unless I add --no-ignore-vcs. Problem with that is I still want it to use every other .gitignore — because it's really helpful!
I also tried --no-ignore-parent, which seems to work well, except it doesn't work at all when I'm in ~/ which is annoying.
It would be really nice to have something like rg --no-ignore-exclude=~/.gitignore
# ignore everything*# except dotfiles!!!!!!.*!.oh-my-zsh# don't commit these dot files to the repo.DS_Store.Xauthority.bash_history.brew_packages.cargo/
# ...
The text was updated successfully, but these errors were encountered:
Your specific feature request is definitely never going to happen. There are already a bazillion flags for ignoring various flavors of ignore files, and I'm sorry, but there is just no way I could justify adding more flags to override individual ignore files. Both the user facing and internal complexity of that is mind boggling to me.
However, thank you for sharing the actual problem you have. Because there are solutions to it.
The first it to add a .ignore file right next to your .gitignore that whitelists everything, and then blacklists whatever you don't want to search. For example, echo '!*' > ~/.ignore.
Second is the approach I use now. I used to do the first approach of, but other than it being annoying for ripgrep, I actually didn't like it because it was annoying to add new files since git ignored everything by default. It happened too often that I'd add something, forget about it, later run git status and see that there were no changes. And only then realize that I had never actually committed the new thing I added. So now I maintain an exhaustive list of ignored files in my home directory.
Hello!
I manage my
~/
directory dotfiles with git. And thus, I have a special~/.gitignore
that excludes everything but dotfiles [1].Sooooo what happens is when I use
rg
, it never finds anything unless I add--no-ignore-vcs
. Problem with that is I still want it to use every other.gitignore
— because it's really helpful!I also tried
--no-ignore-parent
, which seems to work well, except it doesn't work at all when I'm in~/
which is annoying.It would be really nice to have something like
rg --no-ignore-exclude=~/.gitignore
[1] https://github.com/munro/dotfiles
The text was updated successfully, but these errors were encountered: