What does HEAD point to?

I want to compare my local master branch with the remote origin/master branch. I know how to do git pull --rebase; git diff origin/master from my local master branch to detect the line-by-line differences in the code. But, I want to compare the commit histories, i.e., show git log and git log origin/master side-by-side. I tried git show-branch -a but got:

* [master] change content background-color to blue
 ! [origin/HEAD] add favicon
  ! [origin/master] add favicon
---
*   [master] change content background-color to blue
*++ [origin/HEAD] add favicon
  1. Is there a better way?
  2. Also, what does HEAD point to, the checked-out commit?

Answers


You could do:

git log master..origin/master

to list the commits that are "between" master and origin/master.

HEAD points to the checked out commit.

Both the dot-dot syntax and HEAD are documented at gitrevisions(7).


  1. Is there a better way...

    1. to detect the line-by-line differences in the code?

      git diff origin/master..master

    2. to compare the commit histories?

      git log origin/master..master

  2. Also, what does HEAD point to, the checked-out commit?

    HEAD points to the "tip" of the current "branch".


Need Your Help

Improving Crawler4j-Crawler efficiency,scalabitlity

java web-crawler crawler4j

I am Using Crawler4j crawler to crawl some domains.Now I want to Improve the efficiency of the crawler, I want my crawler to use my full bandwidth and crawl as many url's as possible in a given time

Faces Servlet threw exception: java.lang.IllegalStateException

java-ee jsf-2

I am trying to migrate my app from jsf 1.2 to 2.1. I wrote a sample facelet page and tried to access it. Getting following exception. Not sure what causes this issue. If execute only this page (by