What is git pull good for?
Experience Level:
Mid-level
Tags:
Git
Answer
The git pull
command is an alternative to executing two separate commands: git fetch
and git merge
. The first one fetches all new changes from the remote repository to your local repository. The second command merges the fetched changes into your current branch that is currently checked out.
Remember: git pull
= git fetch
+ git merge
Tip:
Before you start using git pull
, we recommend you to use git fetch
and git merge
first. Once you understand the behavior of those two commands well, feel free to start using git pull
.
Related Git job interview questions
-
When and why would you use git stash?
Git Mid-level -
What is git push good for?
Git Mid-level -
What do you need to do in order to use Git for your project?
Git Mid-level -
What are hooks in Git?
Git Mid-level -
What is SubGit good for?
Git Mid-level