LoginSignup
21
16

More than 5 years have passed since last update.

gitでyarn.lockを常にバイナリとして扱う

Last updated at Posted at 2017-01-27

git add -p で yarn.lock に突入するのを抑止したかった

やり方1: プロジェクト単位の設定

プロジェクトルートに以下のファイルを置く

.gitattributes
yarn.lock binary

やり方2: プロジェクトにコミットせず個人的に設定

.git/info/attributes
yarn.lock binary

やり方3: 個人のグローバルな設定

~/.gitconfig
[core]
attributesfile = ~/.gitattributes
~/.gitattributes
yarn.lock binary

Ruby の Gemfile.lock や Unity の Asset.yml に応用できる

参考

21
16
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
16