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 hidden or 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 infogit rev-list --help