"origin/master" refers to the reference poiting to the HEAD commit of branch "origin/master".
A reference is a human-friendly alias name to a Git object, typically a commit object.
"origin/master" reference only gets updated when you git push
to your remote (http://git-scm.com/book/en/v2/Git-Internals-Git-References#Remotes).
From within the root of your project, run:
cat .git/refs/remotes/origin/master
Compare the displayed commit ID with:
cat .git/refs/heads/master
They should be the same, and that's why Git says master
is up-to-date with origin/master
.
When you run
git fetch origin master
That retrieves new Git objects locally under .git/objects folder. And Git updates .git/FETCH_HEAD so that now, it points to the latest commit of the fetched branch.
So to see the differences between your current local branch, and the branch fetched from upstream, you can run
git diff HEAD FETCH_HEAD