Railsのbundle install –deploymentとは何なのか

–deploymentオプションと–path vendor/bundleは、GemfileとGemfile.lockに差異がある場合にエラー終了するかどうか以外に動作上の大きな違いはありません。

Better Git diff output for Ruby, Python, Elixir, Go and more

.gitattributes

*.rb diff=ruby
*.rake diff=ruby

これ、git側でデフォルトでよしなにやってほしいけど、どうしてユーザー側に記述させるのだろうか。

考えられる理由としてはこんなかんじ?

  • diff のパフォーマンスに影響が出る
  • rb拡張子といっても必ずしも ruby ファイルとは限らない(?)

.gitattributesをいじって特定のファイルをgithubのPRのdiffの対象から外す方法のメモ

加えて下記のようにGitHub Diffのコントロールもできたりする。

<隠したいファイルのディレクトリ>/* linguist-generated

ref. github/linguist: Language Savant. If your repository’s language is being reported incorrectly, send us a pull request!