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

In sourcetree, why can't I click on a bookmark and request a clone?

Kimball Johnson July 18, 2016

In source tree I can make bookmarks for branches. When I do so, I know Sourcetree knows the addresses of the remotes for that branch. 

So, when a bookmark is selected, why can't I ask source tree to download a clone of the remote branch associated with that bookmark? 

Or why can't I select a branch in 'log view' and ask Sourcetree to make a clone or get a local copy of the branch?

Why do I have to go to Bitbucket for this operation?

There must be some explanation for why this option is not in sourcetree.

I am not asking for a new feature, I want to know what technical aspect of GIT and its operation would be violated or what aspect of the state of a git repository prevents getting a clone or a copy of the working directory from Sourcetree when a bookmark or a branch for that repository is displayed in the Sourcetree UI?

thanks,

Kimball

4 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 19, 2016

With Git, the primary repository is the local one. If SourceTree/Git were to allow you to easily clone a particular branch, it would almost certainly be cloning your local repository to a new, additional local repository.

Additionally, each time you clone a repository, the clone (as a fully-functioning repository itself) creates a copy of the entire history of the repository. Knowing this, it starts to become clear why it isn't common for people to regularly create multiple clones of the same repository.

If you want to work on two branches of the same repo in parallel, you want to create a worktree. SourceTree does not provide any UI for creating worktrees (you need to use the command line), but once created, the worktree can be added to SourceTree like it is another repository. Keep in mind, since they share repo details, fetching in one will fetch for both, and the two worktrees cannot both checkout the same branch.

0 votes
thinsoldier
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 18, 2016

Your window should look like this:

 image2016-7-18 14:2:22.png

0 votes
thinsoldier
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 18, 2016

I can't see the commit column in your screenshot. If you actually can't see that column you either hid it or resized it to be too small to see.

Your screenshot means that particular commit exactly matches (based on your local copy's last know info about the state of the remote origin) the last commit on 2 branches on your origin: development and AST-649-bla-bla-bla.

I'm guessing you're diving into git on a big pre-existing project. If so, you should make a new empty project to experiment with git and sourcetree to understand better how git info is exposed in Sourcetree.

0 votes
Kimball Johnson July 18, 2016

Umm, I’m a little astounded by your answer….

Here’s my description:  “source tree has a display called a log view - each row represents a group of branches and/or commits (i guess that's what they are) all individually contained in their separate rounded rectangle”

I've attached the image: Kimball

 This display is ‘pretty common’ in source tree. 

So what are these ‘rounded rectangles’ meant to represent? 

Is this a history? Are they pointers representing sequential ‘somethings’? what would the somethings be?

Is there any relationship among them? Why are they all in the same row? Etc, etc…

Thanks,

 

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 19, 2016

Each rounded rectangle represents a branch. A branch is a pointer to a particular commit that will move if a new commit is committed to that branch. 

For more information, you might find the Git Book helpful: https://git-scm.com/book/en/v2

Focus on the first three sections of Chapter 1, and Chapters 2 and 3. (Chapter 3 especially for branching)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events