在使用Source Tree clone代码的时候发现一直出现Templates not found的警告:
warning: templates not found C:\Users\LiuBin\AppData\Local\Atlassian\SourceTree\git_local\share\git-core\templates
进入该路径发现git_local目录下没有share目录,但是mingw32目录下能找到
那么警告出现的原因就很明显了,Source Tree去了一个错误的路径查找Templates当然找不到了,解决办法很简单,设置正确的Templates路径即可。
解决办法:
本人的安装环境是WIN7+Source Tree 2.3.2.0 使用内嵌Git
在C:\Users\<username> 路径下找到.gitconfig文件,用文本编辑器打开,插入以下配置:
[init]
templatedir=C:/Users/LiuBin/AppData/Local/Atlassian/SourceTree/git_local/mingw32/share/git-core/templates
注意:路径中的"\"要替换为"/",否则clone的时候会报错!
参考资料:https://answers.atlassian.com/questions/250260/about-git-path-for-sourcetree