Checkout, Fetch and Pull in BitBucket SourceTree

107,513

Using Atlassian's Git tutorial (link updated) as a reference.

Git checkout:

The git checkout command lets you navigate between the branches created by git branch. Checking out a branch updates the files in the working directory to match the version stored in that branch, and it tells Git to record all new commits on that branch. Think of it as a way to select which line of development you’re working on.

Source: https://www.atlassian.com/git/tutorials/using-branches#git-checkout

Git pull:

You can think of git pull as Git's version of svn update. It’s an easy way to synchronize your local repository with upstream changes. The following diagram explains each step of the pulling process.

Source: https://www.atlassian.com/git/tutorials/syncing#git-pull

Git fetch:

The git fetch command imports commits from a remote repository into your local repo. The resulting commits are stored as remote branches instead of the normal local branches that we’ve been working with. This gives you a chance to review changes before integrating them into your copy of the project.

Source: https://www.atlassian.com/git/tutorials/syncing#git-fetch

Share:
107,513
Vishnu Y
Author by

Vishnu Y

Updated on February 08, 2020

Comments

  • Vishnu Y
    Vishnu Y about 4 years

    I am using BitBucket for web based hosting of our projects. Along with that I am using their SourceTree for committing and such purpose. I am a bit confused with the Checkout, Fetch and Pull option available in the SourceTree interface and their usage. Can someone familiar with this tool explains the usage of these options available in SourceTree?