Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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.

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).

@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

thank you!

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
Community showcase
Published in DevOps

Introducing Atlassian Open DevOps

Hey Community! I’m Shana, a member of our DevOps team here at Atlassian. I wanted to make sure you saw our announcement last week about the launch of Open DevOps since you may have missed it amidst a...

516 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you