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:
- Add this to your
~/.gitconfig file:
[core]
attributesfile = ~/.gitattributes_global
- 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
Since adding a
.gitattributesfile to my team's repo January 11th this year, I've found myself toggling the-diffoption a bit too frequently. Thus, I am changing our.gitattributesfile 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:
~/.gitconfigfile:~/.gitattributes_globalfile: