I'm a little confused about git fetch and comparing differences .
I have the following local branches;
- master
- remote/origin/master
In master branch I have a text file which I make changes to, commit and then push to the origin/master.
In another local repo (for test purposes) I have a remote to the same repo as above. I run
- git fetch origin master
- git diff master origin/master
It displays no differences, but if i do git pull origin master
it pulls and merges the changes I made to the text file. I'm probably wrong but I thought a pull did a fetch and a merge, so doing a fetch allowed me to see the changes to the remote branch before merging them.