How can I configure via git-config the unified context so that I don't have to always provide the -U or --unified option with a value?
1 Answer
git config --global diff.context <value> will set it to show <value> lines of context in any repo you work with.
3 Comments
Chris Cleeland
How would discover this tidbit? For example, I looked in the output of "git help diff" and it did not refer me to any config documentation.
Amber
@ChrisCleeland
git help configNeon
This configuration option is not available in git 1.7.1. so I had to create an alias around it (I see a gui.diffcontext config option, but setting that makes no difference to the current default of 3 lines.) e.g. git config --global alias.di 'diff --unified=9'