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
When pnpm creates .pnpm-store/ inside a Git repository, its contents appear as untracked files unless the user manually adds the directory to .gitignore.
I think pnpm should handle this automatically.
Describe the solution you'd like
Automatically create a .gitignore inside pnpm-managed store directories containing:
*
This would prevent store files from appearing in git status without requiring changes to the project’s .gitignore.
Ruff and pytest already use this approach for their cache directories.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Contribution
Describe the user story
When pnpm creates
.pnpm-store/inside a Git repository, its contents appear as untracked files unless the user manually adds the directory to.gitignore.I think pnpm should handle this automatically.
Describe the solution you'd like
Automatically create a
.gitignoreinside pnpm-managed store directories containing:*This would prevent store files from appearing in git status without requiring changes to the project’s .gitignore.
Ruff and pytest already use this approach for their cache directories.
Describe the drawbacks of your solution
Describe alternatives you’ve considered
Users can manually add .pnpm-store/ to their .gitignore, but I think tools should ideally ignore their own generated cache files.
Moving the store under node_modules/, as done in https://github.com/pnpm/pnpm/pull/13536, also helps but does not cover every custom store location.
I’d be happy to work on a PR if the maintainers agree with this approach.
All reactions