我收到这个错误 警告:找不到模板/ usr / local / git / share / git-core / templates 当我在本地存储库中克隆repo时 这个链接, 这个链接,和 这个链接 我尝试了这种方法,我只等了20多分钟,但是repo没有克隆。我使用source-tree和OS X El Capitan。我该如何解决?
我收到这个错误 警告:找不到模板/ usr / local / git / share / git-core / templates 当我在本地存储库中克隆repo时 这个链接, 这个链接,和 这个链接 我尝试了这种方法,我只等了20多分钟,但是repo没有克隆。我使用source-tree和OS X El Capitan。我该如何解决?
创建模板文件夹。
在你的情况下,它应该是: mkdir /usr/local/git/share/git-core/templates
创建模板文件夹。
在你的情况下,它应该是: mkdir /usr/local/git/share/git-core/templates
我也得到同样的错误 警告:找不到模板/ usr / local / git / share / git-core / templates当我在本地存储库中克隆repo然后我找到解决了我的问题的解决方案。 我在主目录中添加了[init]部分到.gitconfig,以便在克隆repo时查看SourceTree的git templates目录:
[在里面] templatedir = /Applications/SourceTree.app/Contents/Resources/git_local/share/git-core/templates
希望它会对你有所帮助!
在源代码树的情况下 脚步:
Source tree Menu
Preferences
Git
Click on System Git under Embedded Git Version 2.2.1
Reset to embedded Git
Restart source tree
与Rohit的回答类似,我进入了SourceTree的Tools-> Options-> Git并选择了“Update Embedded Git”。安装最新的Embedded Git版本后,警告停止发生。
确保在系统中安装了git。通过在命令提示符/终端上键入git来检查。