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

Why isn't my folder recognized as a valid git working copy in Sourcetree?

Plazko CTO
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2014

I found a similar question from 2013 with no answers: https://answers.atlassian.com/questions/197337/sourcetree-doesn-t-recognize-an-existing-repository

Product: Sourcetree

I'm using Windows 8 with Sourcetree 1.5.2.0

I have a valid git working copy on my local hard drive. If I go to the command-line and run "git status" from within the working directory, it returns:

"Your branch is up-to-date with oprigin/master. Nothing to commit, working directory clean"

The working directory has a valid .git folder.

The problem:

When I try to add this working directory to sourcetree, I get an error saying it isn't a valid working directory. I've tried two ways:

1. File > Open > Select Directory

Error: the path 'somepath/workingdir' is not a valid Git repository working copy.

2. Push the Clone/New button. Select the "Add Working Copy" tab. Select the correct working copy path.

Repository Type: This is not a valid working copy path.

Is this a bug or am I missing something? Thanks.

2 answers

1 accepted

30 votes
Answer accepted
Plazko CTO
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2014

The problem was that for some reason Git support had been disabled in sourcetree. I went to the Git tab under Options and clicked "enable git support" and all is working now.

Thanks.

pgeorge2001 February 19, 2016

I had exactly the same problem.  No idea why Git Support had been disabled.  Maybe an upgrade broke it. (Using version 1.7.0.32509)

Jorge Román
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 8, 2017

Thanks a lot for your answer, I had exactly the same problem after apply 1.10.18.1 update

NISHAT MAZHAR
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2018

Thanks for your answer. It worked for me.

Lennart Stevens
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2019

Thanks, 5 years later, this is still accurate!

Dave Ludwig January 30, 2020

6 years!

Deleted user June 16, 2020

This is still valid!

Like Lennart Stevens likes this
P Satish Patro March 16, 2021

7 years!
Version3.1.3.XX

1 vote
syntap
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2015

I just installed SourceTree 1.6.13.0 and ran into this issue opening a copy of a repository on a travel machine.  It worked after I filled in my name/email default user info in Tools -> Options -> General tab.  I believe it asked for similar info during installation but it didn't populate that tab with it.

I also have "Allow SourceTree to modify your global Git and Mercurial config files" checked, which I'm assuming is also checked on the machine this repo was copied from.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events