How do you get changes from the remote repository to your computer?
Experience Level: Junior
Tags: GitSource 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?
GitSource control JuniorHow can you find out what were the most recent changes in Git repository and who made them?
GitSource control JuniorWhat is a difference between local and remote repository?
GitSource control JuniorHow do you create local Git repository?
GitSource control JuniorHow do you send changes from local Git repository to remote repository?
GitSource control Junior