First, let us understand what git pull
is:
The git pull command is used to fetch and download content from a
remote repository and immediately update the local repository to
match that content. The git pull
command is a combination of
git fetch
and git merge
. git pull
will download the content from
the remote repository. Once the content is downloaded, git merge
will
merge the content to your local repository. A new merge commit will
be created and HEAD updated to point at the new commit.
Now that we know what git pull
does, when we do
git pull origin master
, it simply fetches a copy of the master
branch from the original repository, and merges it with the current
branch that you have checked out.
For more information, you can go to this link.