Git log outputs in a specific revision range

A revision is specified by its SHA1 hash.

If you want to see commits for specific files, you have to separate paths with --:

git log oldhash..newhash -- path/to/inspect

does this.

Also note that you are using three dots (...) to specify the range. Usually, you only want two dots.

Three dots might not give the result you’d expect. As the man page for gitrevisions (section SPECIFYING RANGES) says, while

git log a..b

means give me all commits that were made since a, until and including b (or, like the man page puts it “Include commits that are reachable from b but exclude those that are reachable from a”), the three-dot variant

git log a...b

means “Include commits that are reachable from either a or b but exclude those that are reachable from both”, which is a totally different thing.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)