Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

This is not a valid working copy path

So I'm trying to upload my website but I having a lot of issue. I'm new to Sourcetree and I've been breaking my head here. I added my github account and everything went fine there. but when I try to add a repository and add folder I get "This is not a valid working copy path." and the add button is grayed out. In addition, in Tool > Option > Git my embedded button is grayed out too. please help embedded.jpgmyWebSite.jpg

2 answers

One rare scenario for this error:

- Sourcetree or the machine crashes

- Sourcetree (oddly) loses its config and git is now disabled

- Instead of showing a relevant message, such as"Git is disabled, check options", Sourcetree says the path is not a valid repository

1 vote
Mikael Sandberg Community Leader May 08, 2019

Hi Alvin,

Welcome to the Atlassian Community.

The Embedded button is grayed out because that is what is being used by Sourcetree, so that is expected.

You are getting the error message because you are are trying to add a directory to Sourcetree that is not a Git repository. In order to add a local repository you first have to initiate it as a Git repository using the command git init. Take a look at Setting up a repository to learn more, and I would also recommend looking at the other tutorials that you find there. 

Mikael Sandberg Community Leader May 08, 2019

And once you are done adding your code to a local repository, follow these steps to upload it to github, Adding an existing project to GitHub using the command line

Like Javer Uribe likes this

Why does Sourcetree not do this automatically?

Like # people like this

Yes, why does Sourcetree not do this automatically? This is the whole purpose of using Sourcetree in the first place.

Mikael Sandberg Community Leader Jan 08, 2020

Hi @Thomas Britt,

If you are referring to adding a new repository, essentially creating a new one, you can use the Create option. The Add implies that you already have the repository in place and just want to add it to Sourcetree so it can be accessed in there.

Like Genevieve Cooper likes this

Gracias, simplemente no me aparecía la opción de agregar el repositorio por que no lo había iniciado. 

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

7,122 views 5 13
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