您的位置:首页 > 其它

解决Windows Git客户端(Source Tree) clone时出现的templates not found问题

2018-01-19 11:25 1311 查看
在使用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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Git Source Tree