Skip to content

be more explicit in gitignore #1175

Open
@xenoterracide

Description

@xenoterracide

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions