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
-
How can you identify who changed the specific file under version control and what were the changes?
Git Source control Junior -
How can you find out what were the most recent changes in Git repository and who made them?
Git Source control Junior -
What is a difference between local and remote repository?
Git Source control Junior -
How do you create local Git repository?
Git Source control Junior -
How do you send changes from local Git repository to remote repository?
Git Source control Junior