How to make git diff --ignore-space-change the default
You could use git alias or bash alias if you are using shell-available OS.
git alias : Run this command to add alias:
git config --global alias.dfw 'diff --ignore-space-change'
--ignore-space-change can be abbreviated to -w
to apply the alias using:git dfw
bash alias : Run this command to add bash alias:
echo "alias gitdfw='git diff --ignore-space-change'">>~/.profile
Open a new terminal and you can directly run
gitdfw
to achieve the same.
According to the Git Config manual, there's no such option. Your only option is to make an alias.
Old question (2011), but now there's a shortcut git diff -w
which stands for --ignore-all-space
Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.