0

How can I display commits between two commits in the past in log of commits? I found this article useful.

But I cant understand the references/others. Can somebody make it clear to me, please?

I found that if for example, I want to inspect between last 3rd and 4th commits this is the command git log HEAD^2 -2

Ali Saberi
  • 864
  • 1
  • 10
  • 33

1 Answers1

0

git log takes a range of commits as an argument, so you could do git log commit1..commit2

Serban Constantin
  • 3,316
  • 1
  • 18
  • 20
  • A Simple question: How can is indicate `commit1` and `commit2` without using this long strings commit 3e63c4d92b46b88a04073d3f524d12dc0ae0f2aa – Ali Saberi Apr 20 '15 at 15:22
  • @AliSaberi There are multiple ways of referring to commits other than by their full hashes, all explained in the following section of the Pro Git book: http://git-scm.com/book/en/v2/Git-Tools-Revision-Selection. Read it. – jub0bs Apr 20 '15 at 15:37