Missed Team ’24? Catch up on announcements here.

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

Newbie needs advice on refreshing repository on disk.

John Novack
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 6, 2014

I have used just about every sccs from rccs through svn, but this is my first time using git, stash, and SourceTree. I have downloaded a repository to my desktop successfully, but have no idea how to refresh it. Trying Clone / New brings up a dialog box with prompts that may be clear as gin to experienced users, but I have no clue (and no manual - what's up with that) that tells me what goes in each text field, particularly 'Source Path / URL:' and Destination Path. I tried the same remote source and desktop folder that the current repository resides in, but got an error message saying that the directory already exists and is not empty. All I want to do is refresh my existing desktop repository with the updated original in git.

3 answers

0 votes
Seth
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.
July 7, 2014

Note that you'll only be able to Stash changes if SourceTree recognizes the folder as a repository.

0 votes
John Reynolds July 7, 2014

John,

If you made changes, consider first creating a branch or "Stash save" so you don't lose your work.

Clone will basically re-create the repo. Since you already have that, it's not what you probably want.

You most likely want either git "pull" or fetch", depending on what you want done to the code.

May I suggest this simple guide, and in particular the section on "replace local changes" which might help.

0 votes
Seth
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.
July 7, 2014

For every newbie, I recommend reading portions of the Git Book. Focus on sections 1.1-1.3, and chapters 2-3.

For starters, it is unclear what you mean by "I downloaded a repository". This is not a typical step when setting up a Git repository. To find out whether what you doesnloaded was actually an entire repository, or just a copy of the latest versions of the files, find out whether you have a .git directory in the root folder (will be a hidden folder). If you do, you'll want to skip the "clone" stage, and instead "Add Working Copy". If there is NOT a .git folder, you won't want to use this download as the basis of your repository.

The Stash UI should provide a "Clone in SourceTree" button. Click that, and it should launch SourceTree with the appropriate URL pre-populated. You'll need to choose the destination path for the repository (where you want your local copy to reside).

Once you have a repo set up in SourceTree, understanding the UI is dependent on understanding Git. The terminology is identical in nearly every instance.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events