Merging with git-pull

Published 6th May 2008

The git-pull command is basically a shortcut for:

git-fetch && git-merge origin

The fetch gets the changes from the remote repository, but does not merge them with your local checkout yet. You can examine these changes using origin as the reference, and merge them into your master branch.

The git-fetch part is optional. You can pass . (current directory) to it and merge local branches.

git-pull . refactor
git-merge refactor

Both commands will do the same: merge the refactor branch.