Can I modify git-add's **default** hunk size?
问题 Using git add -p , one can select changes to a file for staging. One can manually change the hunk size (Can I modify git-add's hunk size?), but I would like to know how to change the default hunk size (for example to a single line). 回答1: You can use the GIT_DIFF_OPTS environment variable to tell Git how many lines of context it should include in a hunk every time it has to generate a patch. In your case, you would say: export GIT_DIFF_OPTS=-u0 where the -u0 option (the short version of -