Fixes SourceTree Templates Not Found Warning

There is a warning in SourceTree when working with git. It confuse me for a long time:

warning: templates not found C:\Program Files\Git\share\git-core\templates

This warning may caused by SourceTree which configured the templatedir to C:\Program Files\Git\share\git-core\templates and is not correct for 64 bit git on Windows. For 64 bit git it default install its templates to C:\Program Files\Git\share\git-core\templates.

To fix this warnings, either edit .gitconfig in the user directory (%USERPROFILE%/.gitconfig).

[init]
templatedir = C:\\Program Files\\Git\\mingw64\\share\\git-core\\templates

Or via command line:

git config --global --replace-all init.templatedir = "C:\Program Files\Git\mingw64\share\git-core\templates"

Note: You may have git for Windows installed at other location, change the path set above.

UPDATE:

For mac user if your are using system git, the template path is /Library/Developer/CommandLineTools/usr/share/git-core/templates.