Vasiliy
Vasiliy

Reputation: 55

git log <since> <until> shows all log instead of specified

git-log man page says:

git log [options] [since..until] [[--] path...]

since..until Show only commits between the named two commits. When either or is omitted, it defaults to HEAD, i.e. the tip of the current branch. For a more complete list of ways to spell and , see gitrevisions(7).

When I do git-log for some refs of the repo I get the hole log:

$ git log HEAD^ HEAD
commit 1e939a4f7097efd03b8a66607b561c5f698b3082
Author: Vasiliy <dixel@unen.(none)>
Date:   Wed Apr 11 13:58:03 2012 +0400

    3 commit

commit 1da7dcfc1920130f3de9a7c6b8f02d68923d12b7
Author: Vasiliy <dixel@unen.(none)>
Date:   Wed Apr 11 13:57:50 2012 +0400

    second commit

commit ee8d884f5fb364f667f8dcbf27b23afb3a4eeb85
Author: Vasiliy <dixel@unen.(none)>
Date:   Wed Apr 11 13:57:31 2012 +0400

    first commit

$ git branch
* master

What should I do to be able to show log since and until some revisions?

Upvotes: 3

Views: 2785

Answers (2)

Tim
Tim

Reputation: 2066

If you use git log HEAD~ HEAD shows all content from HEAD and HEAD~

git log HEAD~..HEAD means git log includes HEAD~ and up to commits HEAD

Upvotes: 1

Thilo
Thilo

Reputation: 262494

Didn't you just miss the .. ?

git log HEAD^..HEAD 

Upvotes: 8

Related Questions