Last active
November 14, 2020 14:13
-
-
Save klaaspieter/908433 to your computer and use it in GitHub Desktop.
Get a revision number from git by counting the number of commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list --count --all |
Thanks @jerrygreen. Updated.
Just in case: Github Gists use more granular git rev-list --branches --count
for their "Revisions" count, so that's more appropriate to use probably (in most cases)
Sounds weird for a prop name though, because sounds like count of git branch
but it's not ;) More info git rev-list --help
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now it's simply
git rev-list --count --all