How can I fetch the remote log without getting the changes/commits ?
I only want to view the log, if there is any new changes since my last pull
. Basically avoiding having to stash
or commit
my changes first.
The git help files have this example, which in inverted form should give the result I want:
git log master --not --remotes=*/master
Shows all commits that are in local master but not in any remote repository master branches
You have to fetch the changes, without merging them (i.e. don't use
pull
):After that you can use
log
(and other tools) to have a look at the remote's branch:FETCH_HEAD
is an alias to the latest fetched branch, in this caseorigin/master
, just likeHEAD
is an alias to the latest commit of your currently checked out branch.