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

在使用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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值