Utilizing git rev-list with revision range

Revision List

When needing to utilize the range option for "git rev-list" you will need to use the full SHA-1 for each of the revisions.

As an example if you wanted to compare your current build you are pushing to CircleCI to main:

mainbranchsha=$(git rev-parse origin/main)
git rev-list --count $mainbranchsha..$CIRCLE_SHA1


Was this article helpful?
3 out of 5 found this helpful



Article is closed for comments.