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

add a local git repo in SourceTree

Rafael Carrascal Reyes
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 29, 2012

Hi. I have a local workspace with some projects, sincronized with a remote git repo. ¿How to add the existing working copy (git local repository) to SourceTree?

3 answers

1 accepted

9 votes
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 29, 2012

Lots of ways! :)

  1. Drag & drop the folder from Finder into the Bookmarks window to add it to your bookmarks
  2. Drag & drop the folder onto your dock icon
  3. File > Open (Cmd-O) and browse to the path
  4. Click 'Add Repository' on the bookmarks window, select the 'Add Working Copy' tab and browse to the local repo

Paul Wehr
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 29, 2021

I was confused for a while (neophyte!) I wanted to add the hidden .git directory or one of the sub files/directories but it was the parent directory where the .git file was located.

All is good to go after migrating to a newer computer. Thanks for the direction and hints.

0 votes
gbosio
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!
April 15, 2013

Hello,
I have a problem with local repo: if I add a repository with "Add Working Copy" it seems to be ok, SourceTree tells me that it a git repository, but when I open it I have this error: "'git status' failed with code 128:'fatal: Not a git repository (or any of the parent directories): .git".

What can I do?

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2013

The check when you provide a path to add as a working copy is actually quite rudimentary, it just checks for the presence of the .git folder. If git is failing when it's added and *real* git commands start being called on it, that means that the .git folder is a red herring and that it really isn't a git repo after all.

0 votes
Rafael Carrascal Reyes
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 29, 2012

Yeah, very intuitive. I could find the way just five after doing the question. Thanks!.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events