Reputation: 604
git pull origin foo
It will fetch and merge ONLY branch foo. But what happens when you run
git pull
without any arguments?
Upvotes: 6
Views: 1688
Reputation: 16420
In my experience git pull
also includes a git remote update origin
Upvotes: 0
Reputation: 648
git pull
without any arguments defaults to currently checked out branch and the remote repository it is set to track.
The manual page for git pull isn't super user friendly but:
Incorporates changes from a remote repository into the current branch.
Default values for
<repository>
and<branch>
are read from the "remote" and "merge" configuration for the current branch as set bygit branch --track
.
Upvotes: 6
Reputation: 2686
git pull
actually is a git fetch
then calls git merge
to merge the retrieved branch heads into the current branch.
Here is the syntax for the pull:
'git pull' [options] [<repository> [<refspec>...]]
everything in the []
are optional so it should attempt to merge all branches
Upvotes: 1