-1

enter image description here

I wanted to bring the latest state of the remote locally, so I pressed "pull" in the above image, but the latest state was not downloaded.

When I pressed "fetch" for a trial, the latest status was downloaded as expected.

I thought "you can download the latest state with" pull "", but what is the difference between "pull" and "fetch"? What does "pull" do?

Is there any part of this matter explained in official documents?

森口万太郎
  • 805
  • 6
  • 20

2 Answers2

0

fetch is used to get all branches from remote repository into your local system

pull is used to get all updated code from remote branch into your local branch

0

Git Fetch is the command that tells the local repository that there are changes available in the remote repository without bringing the changes into the local repository.

Git Pull on the other hand brings the copy of the remote directory changes into the local repository.

Source: here

Eddie
  • 150
  • 1
  • 11