Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

About git path for Sourcetree


I got a problem when I want to clone a repository from bitbucket using sourceTree in MAC OS. It seems sourcetree default my git PATH in /usr/local/git while my git is exactly installed somewhere else(installed with brew) which makes the warning below when cloning and the cloning can't be finished.

warning: templates not found /usr/local/git/share/git-core/templates

How could I fix this problem! Much thanks!

6 answers

1 accepted

21 votes
Answer accepted

I had the same "Template not found" error with a fresh installation of SourceTree in Yosemite 10.10.3 with Xcode 6.3.1 installed. To investigate the problem I opened the SourceTree Preferences and went to the Git Preferences Panel. There the panel was reporting that I was using the embedded version, I switched to "System Git" and then switched back to "Embedded Git", and it fixed the problem.


Seems like there may be a glitch in SourceTree, I hope my findings helps anyone who is having the same problem.

It works after I switchted to 'System Git' .  

alough I downloaded and installed git from

Like # people like this

I can confirm this is a problem with the embedded git version (v2.8.1). Switching to System Git (v2.10.1) fixed the problem. 

When I had this problem I was l already using system git, but switching to the embedded one fixed it.

This was bugging me for ages, although it didn't seem to affect the speed with which I could clone repos. Anyway, I fixed it by adding the [init] section to .gitconfig in my home directory, so that it looked at SourceTree's git templates directory when cloning a repo:

templatedir = /Applications/

This seems to have worked. I still can't clone a submodule from Bitbucket due to a different error involving passwords. But the templates portion of the error went away thanks to this.

Thanks! This worked for me too!

If it is Windows, try it with


    templatedir = C:/Program Files/Git/mingw64/share/git-core/templates

Like Jicy_Ann_Thomas likes this


templatedir = C:/Users/[name]/AppData/Local/Programs/Git/mingw64/share/git-core/templates

Depends on where the git is. It's strange the git is in different places with default installation.

Thank you Segal, your workaround was perfectly worked for me.

With Xcode 6.3.1, Source tree and Yosemite 10.10.3

Thank you for posting this.


  • Source tree Menu
  • Preferences
  • Git
  • Click on System Git under Embedded Git Version 2.2.1
  • Reset to embedded Git
2 votes
KieranA Rising Star Jan 12, 2014

Hey Norlan,

What happens when you type in "which git" at the terminal?



this should be a soft link organized by the brew,the actual home path of the git should be /usr/local/homebrew/Cellar/git/ where I can find the share/git-core/templates

Seth Rising Star Jan 12, 2014

Is sourcetree configured to use embedded or system git?

Thanks for helping! It's just a stupid mistake. Sourcetree can works normally through this warning, but I need to wait for nearly an hour to finish the cloning for the project is too large. Embarrassing.

KieranA Rising Star Jan 13, 2014

Sorry Norlan, I'm being silly. SourceTree runs in its own environment entirely. Whatever is on your PATH won't be used by SourceTree. I'm assuming based on what you've said that you're using system Git in SourceTree and have specified /usr/local/git as the Git path. Check it out by going to Preferences > Git and seeing what it says there.


It would be helpful if the "accepted" answer here was an actual answer, instead of a series of questions and answers. If I understand correctly, there isn't an actual solution for the problem (a warning when running git actions in sourcetree).

Seth Rising Star Sep 24, 2015

@David Resnick Did any of the other answers work for you?

Since it's only a warning, I haven't done much further investigations. I did change the git used by sourcetree from internal to what I have installed on my machine (2.5) and I haven't seen any further warnings. BTW, I wanted to reply to you here yesterday but I couldn't because I didn't have enough karma points. This stackoverflow platform looks nice, but it looks like it isn't being used very well to help answer questions about the product (sourcetree). This is the first result when googling the warning output by sourcetree; it would have been great to find an actual answer here.

I found away around it by using iTerm to clone the Repo. I suspect it has to do with the Size of the Repo and SourceTree not being able to cope.

1 vote
Mike Corsaro Atlassian Team Feb 05, 2018

Just to get this all in one post: if you're seeing this on Windows, do the following:

  • First, find and open your .gitconfig, which should be in: "C:\Users\USERNAME\.gitconfig"
  • Then, add the following, and do not wrap the path in single or double quotes:
  • If you're using System Git:
    • [init]
          templatedir = C:/Program Files/Git/mingw64/share/git-core/templates


  • If you're using Embedded Git:
    • [init]
          templatedir = C:/Users/USERNAME/AppData/Local/Atlassian/SourceTree/git_local/mingw32/share/git-core/templates


  • If done correctly, running "git config --global init.templatedir" should print the path you added above.
  • If the above did not print the directory you just added, run "git config --list --show-origin" and find the entry and path for "init.templatedir" -- which will let you know where git is loading the config value from

It worked for me. Thanks.

This happened to me on a 1gig+ repo. Shame the progress bar doesn't show any activity in that time and it looks like it's hung

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events