Skip to content

Treating lockfiles as binary (no diff) is too subjective #160

Description

@devinrhode2

Since adding a .gitattributes file to my team's repo January 11th this year, I've found myself toggling the -diff option a bit too frequently. Thus, I am changing our .gitattributes file to NOT use the -diff (binary) option.

All devs can still individually treat lockfiles as binary,
toggling this setting on/off as they please, like so:

  1. Add this to your ~/.gitconfig file:
[core]
  attributesfile = ~/.gitattributes_global
  1. Add this to a new ~/.gitattributes_global file:
# Better off adding .gitattributes to individual repos.
*.lock            text eol=lf -diff
package-lock.json text eol=lf -diff
pnpm-lock.yaml    text eol=lf -diff
yarn.lock         text eol=lf -diff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions