I got a little confused in git fetch and compared the differences.
I have the following local branches:
- master
- remote / origin / master
In the master branch, I have a text file in which I make changes, make and then click on the start / master.
In another local repo (for test purposes), I have deleted the same repos as above. I launched
- git fetch main host
- git diff master origin / master
There are no differences in it, but if I do git pull origin master
, it extracts and merges the changes made to the text file. I am probably mistaken, but I thought that the attraction made the selection and the merge, so when I performed the selection, I was able to see the changes in the remote branch before they were merged.
source share