I have a local git repository cloned from a central server. The last commit of my local master branch is commit 1.
The central repository has a new commit 2 in master branch.
git fetch origin master
fetch = +refs/heads/*:refs/remotes/origin/*
url = #########
git pull origin master
git diff origin/master
If you run
git fetch origin
refs/remotes/origin/master will be updated.
If you specify a single ref to git fetch origin, then it assumes you just want to pull that to FETCH_HEAD
you can run
git fetch origin master:refs/remotes/origin/master
and that will also update