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

fix: use root-level slashes in .gitignore and .prettierignore #1696

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

JoshuaKGoldberg
Copy link
Owner

PR Checklist

Overview

Per https://git-scm.com/docs/gitignore#_pattern_format, uses preceding / slashes to indicate directories and files that should only be matched at the root. Which is all of them.

The Git docs also noted that a trailing / makes the pattern only match directories. Since these are known directory names that won't be swapped with files accidentally, I took out any trailing /s to keep the files as small as possible.

Aside: Per https://lore.kernel.org/git/[email protected], I'm pretty sure the Git docs have a small typo. But per https://lore.kernel.org/git/[email protected] I don't know that it'll get resolved soon.

💖

@JoshuaKGoldberg JoshuaKGoldberg merged commit 9e1c008 into main Nov 26, 2024
14 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the gitignore-prettierignore-slashes branch November 26, 2024 20:06
Copy link

🎉 This is included in version v1.77.0 🎉

The release is available on:

Cheers! 📦🚀

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

Successfully merging this pull request may close these issues.

🐛 Bug: Use root-level slashes for root-level directories in .gitignore and .prettierignore
1 participant