Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge global and cwd .gitignores #1379

Open
andrhua opened this issue Sep 6, 2023 · 1 comment
Open

Merge global and cwd .gitignores #1379

andrhua opened this issue Sep 6, 2023 · 1 comment

Comments

@andrhua
Copy link

andrhua commented Sep 6, 2023

I'm trying to prevent .git/ from polluting results when searching files inside $dayjob repo. I'll probably never want to search .git/* files, so I put .git/* in ~/.config/git/ignore. However repo has its own .gitignore without .git/* entry, and to my understanding, it takes precedence over global one. If I put .git/* in local .gitignore, fd picks it up immediately, but I don't want to put it for each project I happen to work on.

@tmccombs
Copy link
Collaborator

tmccombs commented Sep 7, 2023

fd will merge ~/.config/fd/ignore with local ignore files. However, it doesn't do anything with ~/.config/git/ignore, because in order to do so, it would need to process git configuration (because that locaiton can be overridden with the core.excludesFile configuration).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants