1 Answer

0 votes
by

In the simplest terms, git pull does a git fetch followed by a git merge.

You can do a git fetch at any time to update your remote-tracking branches under refs/remotes/<remote>/.

This operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this).

git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.

Related questions

0 votes
    What is the difference between git pull and git fetch?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    Explain the difference between git fetch and git pull....
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    How will you differentiate between git pull and git fetch?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    How will you differentiate between git pull and git fetch?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    When you run git fetch from my local repo, will it update your local code and target branch? (1)Yes, the command ... new commits and keep them in a separate branch in local repo...
asked Oct 26, 2020 in Technology by JackTerrance
0 votes
    When you run git fetch from my local repo, will it update your local code and target branch? A. Yes, the command ... new commits and keep them in a separate branch in local repo...
asked Dec 20, 2022 in Education by JackTerrance
0 votes
    When you run git fetch from your local repo, it will update your local changes in working area? A. True – ... It updates local repo only and does not affect the working area...
asked Dec 20, 2022 in Education by JackTerrance
0 votes
    I cloned a Git repository, which contains about five branches. However, when I do git branch I only see one of ... staging * etc... Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    How can we force “git pull” to overwrite local files?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    I have created a branch named dev. I have done a pull request to send dev code to master, when I do ... to resolve these conflicts. Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    I have a project consisting of a huge amount of data. Because of its size, I can't use a remote GIT repo and push/pull ... -ProjectGit | | |-objects |-project1 | |-refs | |-.git...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    My git workspace is dirty, there are some local modifications. When I use the command git pull origin master it ... Ansible git module? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    What is the difference between git checkout [branch name] and git checkout -b [branch name]?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    What is the difference between ‘git remote’ and ‘git clone’?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    What is the difference between the ‘git diff ’and ‘git status’?...
asked Nov 2, 2020 in Technology by JackTerrance
...