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

Respect gitignore from above #86

Open
vonagam opened this issue May 18, 2018 · 5 comments
Open

Respect gitignore from above #86

vonagam opened this issue May 18, 2018 · 5 comments
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted

Comments

@vonagam
Copy link

vonagam commented May 18, 2018

Issuehunt badges

Currently only gitignores from cwd and down are taken into account for gitignore filtering. What about those who are higher in a hierarchy?

Use case: monorepo repositories (like babel for example), where gitignore is placed in root and individual packages do not have their own.

There is a $80.00 open bounty on this issue. Add more on Issuehunt.

@callumlocke
Copy link

Another example is stuff you might have in a global .gitignore, like .DS_Store files or personal conventions like IDEAS.md.

@sindresorhus sindresorhus changed the title gitignore from above Respect gitignore from above Jan 9, 2019
@IssueHuntBot
Copy link

@issuehuntfest has funded $80.00 to this issue. See it on IssueHunt

@sindresorhus
Copy link
Owner

If anyone wants to work on this, see the initial attempt and feedback in #107. This issue is blocked by mrmlnc/fast-glob#265.

@sindresorhus sindresorhus reopened this Mar 7, 2021
eventualbuddha added a commit to codemod-js/codemod that referenced this issue Nov 14, 2021
After #772 made `codemod` respect `.gitignore` files by using the `gitignore` option in `globby`, I pretty quickly ran into sindresorhus/globby#86. There didn't seem to be an obvious workaround for this, so I ended up building the functionality to search up for `.gitignore` files so that e.g. running `codemod` in a subdirectory would respect a `.gitignore` at the root of the git repo.

This commit also contains some more cleanup and fixes which I didn't bother to separate.
eventualbuddha added a commit to codemod-js/codemod that referenced this issue Nov 14, 2021
After #772 made `codemod` respect `.gitignore` files by using the `gitignore` option in `globby`, I pretty quickly ran into sindresorhus/globby#86. There didn't seem to be an obvious workaround for this, so I ended up building the functionality to search up for `.gitignore` files so that e.g. running `codemod` in a subdirectory would respect a `.gitignore` at the root of the git repo.

This commit also contains some more cleanup and fixes which I didn't bother to separate.
eventualbuddha added a commit to codemod-js/codemod that referenced this issue Nov 14, 2021
After #772 made `codemod` respect `.gitignore` files by using the `gitignore` option in `globby`, I pretty quickly ran into sindresorhus/globby#86. There didn't seem to be an obvious workaround for this, so I ended up building the functionality to search up for `.gitignore` files so that e.g. running `codemod` in a subdirectory would respect a `.gitignore` at the root of the git repo.

This commit also contains some more cleanup and fixes which I didn't bother to separate.
@fisker
Copy link
Collaborator

fisker commented Jan 25, 2022

I may have a solution for this, we can find root .git directory, and glob .gitignore from there.

@gilisho
Copy link

gilisho commented Jul 3, 2024

@sindresorhus is doing what @fisker suggested can be done in globby itself? I am not familiar with your codebase, but I am using globby and did it myself in my codebase instead. If this mechanism was in globby itself that would be awesome.
I am willing to look into it if you are up for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants