Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch remote log, not the commits

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
like image 909
Kim Avatar asked May 24 '12 11:05

Kim


1 Answers

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.

like image 147
Koraktor Avatar answered Oct 22 '22 19:10

Koraktor