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?
The template directory contains files and directories that will be copied to the $GIT_DIR after it is created. The files which are copied from the template directory are placed in your GIT_DIR which defaults to the . git directory under your repo's root directory.
Git Template is a replacement for the default directory that gets copied each time you create or clone a git repository. That's right, every time you create or clone a git repository, some files get copied in your . git directory. These files mostly consist of example hooks you may change and adapt to meet your needs.
The Git clone command will create a new local directory for the repository, copy all the contents of the specified repository, create the remote tracked branches, and checkout an initial branch locally. By default, Git clone will create a reference to the remote repository called origin .
Create a templates folder.
In your case, it should be: mkdir /usr/local/git/share/git-core/templates
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!.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With