问题
I get this error warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository this link, this link, and this link I tried this method and I just waiting more than 20 minutes but repo doesn't clone. I use source-tree and OS X El Capitan. How can I fix it?
回答1:
Create a templates folder.
In your case, it should be: mkdir /usr/local/git/share/git-core/templates
回答2:
I was also getting same error warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository then i found solution which solved my issue. I Added the [init] section to .gitconfig in home directory, so that it looked at SourceTree's git templates directory when cloning a repo:
[init] templatedir = /Applications/SourceTree.app/Contents/Resources/git_local/share/git-core/templates
Hope it will help you!.
回答3:
In case of Source tree on macOS Steps:
Source tree Menu
Preferences
Git
Click on System Git under Embedded Git Version 2.2.1
Reset to embedded Git
Restart source tree
回答4:
Similar to Rohit's answer, I went into SourceTree's Tools->Options->Git and selected "Update Embedded Git". After the latest Embedded Git version was installed, the warning stopped occurring.
回答5:
Make sure you have git installed in your system. Check by typing git on command prompt/terminal.
来源:https://stackoverflow.com/questions/34877649/warning-templates-not-found-usr-local-git-share-git-core-templates