You should fetch the remote branch then interact with it. git fetch
will pull the remote branch into your local repository's FETCH_HEAD, but not your working directory.
git log FETCH_HEAD --decorate=full
will let you see where your HEAD is in comparison to refs/origin/HEAD, which is the remote branch.
git whatchanged FETCH_HEAD --decorate=full
is the same as above, but also shows the files that have changed.
git diff HEAD FETCH_HEAD
diffs between your repository's HEAD and the remote branch's HEAD that you just fetched
git diff --stat HEAD FETCH_HEAD
a summary preview of the changes, just as you would see during the merge and at the bottom of a git pull.
Note that if you do wish to pull in the fetched changes, just do a git merge FETCH_HEAD
. (When you git pull
you are essentially just doing a fetch then a merge)