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
Git for beginners
Git for beginners

Are you learning Git? Try our test we designed to help you progress faster.

Test yourself