Resolves a templates not found issue with Windows edition git

Source: Internet
Author: User
Tags sourcetree

Environment:

    • WIN10 x64
    • Git Windows Client (download from https://git-scm.com/)
    • Sourcetree 1.9.6.1 (using system-installed git instead of sourcetree embedded git)

Problem:

Clone source Today, there is a warning message "Warning:templates not found C:\Program files\git\share\git-core\templates". Then find a way to solve it.

Analysis:

Look at the hint that the Tamplate file was not found. Follow the path in the error prompt to find, there is no corresponding directory. There are only these folders in my Git installation directory:

So searched the Templates directory, originally it in C:\Program files\git\mingw64\share\git-core\templates this position.

The reason found: The original Sourcetree went to a wrong location to find the template file, of course, can not find. We'll just tell it the right place.

Solutions

1. The settings page of the sourcetree was searched everywhere and no place was found to set the template. Then try to modify the configuration file directly.

2. Since sourcetree is calling git, we are going to modify the git configuration file.

3. In the WIN10 system, the git configuration file is located in the c:\users\< login user name >\.gitconfig. Use the text Editing tool to open and add the following lines:

[Init]

Templatedir=c:/program files/git/mingw64/share/git-core/templates

Resolves a templates not found issue with Windows edition git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.