Reputation: 2787
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
Upvotes: 8
Views: 1940
Reputation: 42983
You have to fetch the changes, without merging them (i.e. don't use pull
):
git fetch origin master
After that you can use log
(and other tools) to have a look at the remote's branch:
git log FETCH_HEAD --not master
FETCH_HEAD
is an alias to the latest fetched branch, in this case origin/master
, just like HEAD
is an alias to the latest commit of your currently checked out branch.
Upvotes: 7