Git FAQ

Frequently asked questions around Git and Version Control.

What does git pull origin master do?

The git pull command is used in many variations (take a look at our git pull command overview to learn more). But one of the notations that developers find themselves typing most often is git pull origin master: it downloads new changes from the branch named master on the remote named origin and integrates them into your local HEAD branch.

The Git Cheat Sheet

No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!


Downloading & Integrating with git pull

Using git pull (and git pull origin master is no exception) will not only download new changes from the remote repository. It will also directly integrate them into your local HEAD branch. By default, this integration will happen through a "merge", but you can also choose a "rebase":

$ git pull origin master --rebase

If you don't want to integrate new changes directly, then you can instead use git fetch: this will only download new changes, but leave your HEAD branch and working copy files untouched.

$ git fetch origin

Using the Plain git pull Command

In most cases, your local HEAD branch will already have a proper tracking connection set up with a remote branch. This configuration provides default values so that the pull command already knows where to pull from without any additional options. This means that, if a tracking connection has been set up, you can simply omit naming the remote repository and branch:

$ git pull

You can learn more about tracking connections in our free online book.


Tip

Easy Pull & Push in Tower

In case you are using the Tower Git client, pulling from a remote is very easy: simply drag the remote branch and drop it onto your current HEAD in the sidebar - or click the "Pull" button in the toolbar.

Learn More

About Us

As the makers of Tower, the best Git client for Mac and Windows, we help over 100,000 users in companies like Apple, Google, Amazon, Twitter, and Ebay get the most out of Git.

Just like with Tower, our mission with this platform is to help people become better professionals.

That's why we provide our guides, videos, and cheat sheets (about version control with Git and lots of other topics) for free.