Utilizing git rev-list with revision range

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 master:

masterbranchsha=$(git rev-parse origin/master)
git rev-list --count $masterbranchsha..$CIRCLE_SHA1

 

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.