Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

What exactly does SourceTree "Pull origin/branchname into current branch" does?

Maris Seimanovs
Contributor
September 30, 2015

I could not find a tutorial for all SourceTree commands so I'm somewhat unsure if this command does what I think it does.

I have a branch which was branched from master some time ago. Let's call it BranchX.

Master branch has remote origin/master and BranchX also has origin/BranchX.

 

Consider these two scenarios:

1) Now some people have done their work on BranchX and I want to merge BranchX into master. Currently I have checked out master branch.

Can I use the command "Pull origin/BranchX into current branch" to fetch origin/BranchX into my local repo and then merge BranchX code into my current working copy (which is master)?


2) I'm working on BranchX and I want to update it with latest changes on origin/master.

Can I use the command "Pull origin/master into current branch" to fetch origin/master into my local repo and then merge master code into my current working copy (which is BranchX)?


Essentially - is "Pull origin/branchname into current branch" meant as a replacement for so-often used process:

checkout master

pull origin/master

checkout BranchX

merge master into BranchX

?

Or does it do something different or something more than I think?

1 answer

0 votes
Tim Crall
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.
October 1, 2015

I think it does exactly what you think it does

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Sourcetree Events