This is not a valid working copy path
Asked by Alvin Cristales:

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.jpg](/t5/image/serverpage/image-id/53900iC81F542EB9E705B7/image-size/large?v=v2&px=999 "embedded.jpg")![myWebSite.jpg](/t5/image/serverpage/image-id/53899i1CF164F78F07A324/image-size/large?v=v2&px=999 "myWebSite.jpg")


Answers:
author: setrov
body: 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


author: Mikael Sandberg
body: 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](https://www.atlassian.com/git/tutorials/setting-up-a-repository) to learn more, and I would also recommend looking at the other tutorials that you find there.

comments: author: Mikael Sandberg
body: 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](https://help.github.com/en/articles/adding-an-existing-project-to-github-using-the-command-line)


author: Jude I
body: Why does Sourcetree not do this automatically?


author: Thomas Britt
body: Yes, why does Sourcetree not do this automatically? This is the **whole purpose**of using Sourcetree in the first place.


author: Mikael Sandberg
body: Hi [@Thomas Britt](/t5/user/viewprofilepage/user-id/3690263),

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.


author: Javer Uribe
body: Gracias, simplemente no me aparec?a la opci?n de agregar el repositorio por que no lo hab?a iniciado.


author: Charles Robertson
body: OK. So, if the local directory already has a .git folder in it, then you need to choose Add Working Copy. This allows you to add source control to the same repo on one or more machines.

However, if this is a directory you wish to clone from a remote repository, the directory must be empty.

Then you choose Clone and then add your files into the directory. And then push your files to the remote.   
Or you can just clone directly from GitHub/BitBucket etc. This will open up SourceTree and automate the process for you. It will then download files from the remote repo to the local repo.

comments: author: jonathanrtaylor
body: What do you mean by 'Add working copy'? That's not an obvious option in Sourcetree.