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

git fetch origin master:master

Peter Siegmund May 18, 2015

How can I do the command git fetch origin master:master within SourceTree? I need the complete command and not only a git fetch or git fetch origin or git fetch origin master...

 

Update: I opened a feature request: https://jira.atlassian.com/browse/SRCTREE-3058

7 answers

0 votes
Balázs Szakmáry
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.
May 18, 2015

Also, there is no way to pull into any other branch than the current. (But I think you mean fetch, not pull.)

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.
May 18, 2015

Hold up, in that feature request you're talking about Pulling branches. Fetch and Pull are very different. Fetch updates the data your repository has about the remote repo, Pull updates your local branches to match the remote.

0 votes
Balázs Szakmáry
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.
May 18, 2015

I think the reason for the "git fetch origin master" not working is that there is no tracking relationship between the local master and the origin/master.

0 votes
Balázs Szakmáry
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.
May 18, 2015

BTW what is wrong with fetching all the other branches as well? It has no harmful effect to your local branches or your workspace. (The only thing it does is update all the origin/* references.)

0 votes
Peter Siegmund May 18, 2015

Don't know, but only master:master worked for me. I wanted to update the master branch without changing into it.

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.
May 18, 2015

What's the difference between "git fetch origin master" and "git fetch origin master:master"?

0 votes
Balázs Szakmáry
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.
May 18, 2015

This level of detail is not possible with the SourceTree UI. You can create a feature request for this at http://jira.atlassian.com (post the link in a comment so others can vote for it.)

Peter Siegmund May 18, 2015

But the UI has a "fetch" command button. Why can't someone add the branch names there? Where can I request this as a feature?

Balázs Szakmáry
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.
May 18, 2015

Edited the answer to contain that info.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events