Skip to content

Instantly share code, notes, and snippets.

@smoya
Last active March 29, 2022 16:23
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smoya/808c98435f518c93adae to your computer and use it in GitHub Desktop.
Save smoya/808c98435f518c93adae to your computer and use it in GitHub Desktop.
Prettify json files output on git diff.
*.json diff=json
[core]
attributesfile = ~/.gitattributes
[diff "json"]
textconv = python -m json.tool
@smoya
Copy link
Author

smoya commented Nov 4, 2015

Use git diff -U50 to increase the number of lines that git shows for each file (context).

@smoya
Copy link
Author

smoya commented Nov 4, 2015

@rickyah
Copy link

rickyah commented Nov 4, 2015

What is json.tool for those of us that don't speak python?

@smoya
Copy link
Author

smoya commented Nov 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment