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

Sourcetree cannot handle backslash in URL of git repository on a computer share

When I specify for the repository location in Repository Settings at URL/Path:


(which is a local shared folder on my computer hosting a bare git repository),

several actions make sourcetree change the config file of the cloned repository and sourcetree inserts extra backslashes:

url = \\\\\\\\BC01245\\\\myproject

fetch = +refs/heads/*:refs/remotes/origin/*

pushurl = \\\\\\\\BC01245\\\\myproject

which cause other applications that use this repository to complain about not finding the repository.

Is this a known problem or is there a way to work around this?


1 answer

0 votes
minnsey Atlassian Team Feb 12, 2018


What happens if you try adding the same remote using command line git?

There is a problem with the backslashes in the MINGW32 terminal started up and probably used by source tree. I have never seen these emulators (cygwin/ming) work without problems on windows. The terminal just refuses the windows machine name notation, it only accepts a unix server name or the windows drive mapping notation to this share (file:://z:).

Here are the details, note git for windows (last one) just works fine:
Terminal started from sourcetree MINGW32:

Welcome to Portable Git (version 1.9.5-preview20141217)

$ which git

  • 4 backslashes do not work:
        USER@BC1234 /d/Models/test
        $ git clone \\\\BC1234\\repo myrepotest1
        Cloning into 'myrepotest1'...
        fatal: '\BC1234\repo' does not appear to be a git repository
        fatal: Could not read from remote repository.

        Please make sure you have the correct access rights
        and the repository exists.
  • 5 backslashes do not work:
        USER@BC1234 /d/Models/test
        $ git clone \\\\\BC1234\\repo myrepotest1
        Cloning into 'myrepotest1'...
        fatal: '\BC1234\repo' does not appear to be a git repository
        fatal: Could not read from remote repository.
  • 6 backslashes do not work:
        USER@BC1234 /d/Models/test
        $ git clone \\\\\\BC1234\\repo myrepotest1
        fatal: repository '\\\BC1234\repo' does not exist

  • fine:    
        USER@BC1234 /d/Models/test
        $ git clone file://z: myrepotest1
        Cloning into 'myrepotest1'...
        cat myrepotest1/.git/config
        url = file://z:
  • fine when using unix server notation (although url now in unix format in config file, compatible with other applications?):    
        USER@BC1234 /d/Models/test
        $ git clone  //BC1234/repo myrepotest2
        Cloning into 'myrepotest2'...
        cat myrepotest2/.git/config
        url = //BC1234/repo
  • Runs fine on git for windows:
      Git for Windows v2.14.2 Release Notes

        D:\Models\test>git clone \\BC1234\repo myrepoclone4
        Cloning into 'myrepoclone4'...

        D:\Models\test>which git
        C:/Program Files/Git/cmd/git.EXE        

              url = \\\\BC1234\\repo  


minnsey Atlassian Team Feb 15, 2018

Thanks for all the details.

For what its worth Sourcetree doesn't  run git within a terminal, instead it either uses libgit2 or directly runs the Sourcetree for Windows git.exe within a .NET process.

I would expect Runs fine on git for windows: yto apply to Sourcetree since we ship with Git 2.15+ now.

If you find using Sourcetree with Git 2.15+ still doesn't work for \\blah\repo style urls please create a ticket at


Thanks for your comment. I am using version 2.3.5, I will try to log a ticket next week. As a workaround I use double forward slashes before the computer name (//BC1234/repo). Git, Sourcetree and other applications understand this non-official UNC path notation.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,290 views 4 5
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