Difference between checkout remote branch and pull remote branch in git?

git, git-checkout, git-pull, merge

Solution

`git pull` contacts the remote repository identified by `origin` and looks for updates. It fetches any updates and then merges the changes into the target branch. It does not create a new branch.

`git checkout -b <branch> origin/<branch>` creates a new branch based on `origin/<branch>`, and does not contact the remote repository. It looks at `origin/<branch>` as it currently exists in your local repository.

The two commands perform very different actions; spending some quality time with the `git-pull` and `git-checkout` man pages might help clarify things.

Problem

What is the difference between: ``` git checkout -b <branch> origin/<branch> ``` and ``` git pull origin <branch> ``` They seem to have the same functionality to me. thanks.

Original source