您的位置:首页 > 其它

解决Windows版Git(SourceTree)出现templates not found的问题

2017-05-19 14:29 645 查看


问题:

今天在用SourceTree clone imsdroid的源码时,出现一个警告信息

warning: templates not found 

C:\Users\baope\AppData\Local\Atlassian\SourceTree\git_local\share\Git-core\templates


环境&解释:

Win 10
SourceTree 1.10.20.1(使用的SourceTree内嵌Git,而非系统安装Git)

解决办法:

1.在SourceTree的设置页面找遍了也没找到设置template的地方。于是想办法直接修改配置文件。 

2. 由于SourceTree是调用了Git,于是我们去修改Git的配置文件。 

3. 在WIn7系统,Git的配置文件位于C:\Users\<登录用户名>.gitconfig。使用文本编辑工具打开并加入如下几行:

[user]
name = DR/Administrator
email = ceek@vip.qq.com

[init] 

templatedir=C:/Users/Administrator/AppData/Local/Atlassian/SourceTree/git_local/mingw32/share/git-core/templates

保存并重启SourceTree,问题解决。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐