LoginSignup
37
39

More than 5 years have passed since last update.

git diff で JSON の比較をいい感じにする

Last updated at Posted at 2012-12-26

リポジトリの .gitattributes に

*.json diff=json

とか書いておいて、 ~/.gitconfig あたりで

[diff "json"]
        textconv = "perl -MJSON -0e \"print JSON->new->canonical->pretty->encode(decode_json(<>))\""

とでも書いておくと git diff で JSON がいい感じに比較できる。

37
39
0

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
37
39