Here is my problem. How could I get all log messages between 2 revision numbers for a specific path ? let me explain via example.
I tried to write it with this line :
git -dir=/home/Desktop/GIT_REFERENCE_REPOSITORIES/manager.git log 10000...15000
I assumed it gives me the log messages related to manager.git between 10000 and 15000 revisions. But it doesn't. Is there anyone to help me ?
The most basic filtering option for git log is to limit the number of commits that are displayed. When you're only interested in the last few commits, this saves you the trouble of viewing all the commits in a page. You can limit git log 's output by including the - option.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With