I am trying to analyse the number of commits done on my master branch. I found two ways, one is on applying filters on git UI and other via git CLI. I got the different output by both the commands. The outputs are as-
ON UI-
is:pr is:merged merged:>=2018-05-20
I got output as 81 Total. And when I try to get the output via CLI using the below command-
Using git CLI-
git rev-list --count HEAD --since="Sep 05 2018"
o/p is- 230 total.
As per my understanding both of these commands should produce same output. Or is there any difference between them ??
Note:- No direct commit on master is allowed.
rev-list
has a whole bunch of filtering options, one of them is :My guess is this is what
is:merged
applies.note : do not forget the 's',
--merge
also exists, and does not do the same thing at all :Thinking about it : github's pull requests are not represented in the git repo, I imagine
is:pr
would list those ; in that case,is:merged
could also filter based on a flag in github's database, and not be something you could check easily throughgit rev-list
.Among your git merges, do you see some which obviously do not match a PR ?