Many programmers use Git to keep track of the different versions of their code. Quite often, they need to start working on the code that has been updated in the remote Git repository. In order to do so, programmers must first bring the code into their local system.
git pull
is the command that fetches the content from a remote repository and integrates it with the local repository/branch. It is, in actuality, a combination of git fetch
and git merge
called in that order. git fetch
downloads content from the remote repository and is followed by git merge
, which merges remote branch heads into the current branch.
See the full syntax of the git pull
command below:
git pull [<options>] [<repository>/<branch>]
The default git pull
command fetches the origin reference, HEAD
, at the remote branch and merges it with HEAD
at the current local branch.
Have a look at the full documentation for more information.
Free Resources