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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

428 views 0 1
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