Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The method to specify the default diff tool when using 'git add' is by setting the 'diff.tool' configuration variable. This can be done using the following command:

git config --global diff.tool <tool_name>

Replace <tool_name> with the name of the diff tool you want to use as the default. For example, if you want to use 'vimdiff' as the default, you can run:

git config --global diff.tool vimdiff

This will set 'vimdiff' as the default diff tool when using 'git add'.