What is git pull good for?
Experience Level: Medior
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 MediorWhat is git push good for?
Git MediorWhat do you need to do in order to use Git for your project?
Git MediorWhat are hooks in Git?
Git MediorWhat is SubGit good for?
Git Medior