How do you get changes from the remote repository to your computer?

Experience Level: Junior
Tags: Git Source control

Answer

To get changes from the remote repository to your computer, use git fetch command. This will download all commits from the remote repository that haven't yet been downloaded to your local repository.

Many people use the git pull command. This command however does more than just fetching the data from a remote repository to a local repository. It is a combination of git fetch and git merge command. Which means that it also merges new changes to your currently checked out branch.

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