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

be more explicit in gitignore #1175

Open
xenoterracide opened this issue Nov 8, 2022 · 0 comments
Open

be more explicit in gitignore #1175

xenoterracide opened this issue Nov 8, 2022 · 0 comments

Comments

@xenoterracide
Copy link

xenoterracide commented Nov 8, 2022

I have a global ~/.gitignore which ignores archives (generally sensible)

# Archives
# https://github.com/github/gitignore/blob/master/Global/Archives.gitignore
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.gzip
*.tgz
*.bzip
*.bzip2
*.bz2
*.xz
*.lzma
*.cab
*.xar
*.zst

# Packing-only formats
*.iso
*.tar

# Package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm
*.msi
*.msm
*.msp
*.txz

I believe that if these sensible rules were added to the repo the same problem would exist.

unfortunately, when combined with a yadm ignore file in a specific repo, it also excludes the zips to be committed, updating the suggested yarn rule from simply the directory seems much more sensible since you wouldn't want a zip file in an arbitrary directory.

!.yarn/cache/*.zip

alternatives to this also exist (e.g. you can omit the extension and just do a glob), but being more specific helps

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

No branches or pull requests

1 participant