Environment:
- WIN10 x64
- Git Windows Client (download from https://git-scm.com/)
- Sourcetree 1.9.6.1 (using system-installed git instead of sourcetree embedded git)
Problem:
Clone source Today, there is a warning message "Warning:templates not found C:\Program files\git\share\git-core\templates". Then find a way to solve it.
Analysis:
Look at the hint that the Tamplate file was not found. Follow the path in the error prompt to find, there is no corresponding directory. There are only these folders in my Git installation directory:
So searched the Templates directory, originally it in C:\Program files\git\mingw64\share\git-core\templates this position.
The reason found: The original Sourcetree went to a wrong location to find the template file, of course, can not find. We'll just tell it the right place.
Solutions
1. The settings page of the sourcetree was searched everywhere and no place was found to set the template. Then try to modify the configuration file directly.
2. Since sourcetree is calling git, we are going to modify the git configuration file.
3. In the WIN10 system, the git configuration file is located in the c:\users\< login user name >\.gitconfig. Use the text Editing tool to open and add the following lines:
[Init]
Templatedir=c:/program files/git/mingw64/share/git-core/templates
Resolves a templates not found issue with Windows edition git