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

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

I think it does exactly what you think it does

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

262 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot