Whats the difference between using the following git commands
git pull origin master
git pull origin master:master
Some ob
A git pull
inherently performs two operations: First, a git fetch
, followed by git merge
.
With git pull origin master
, the master
branch of your origin
remote will be fetched (retrieved), then merged into your current, checked-out branch.
By defining two branch names, you are specifying a refspec of which branch is merged into which.
The generalized example reads as follows: "Retrieve the source branch from the specified remote, merge it with the destination branch.
git pull