Skip to content

Instantly share code, notes, and snippets.

@marvin-kolja
Created January 5, 2024 14:58
Show Gist options
  • Save marvin-kolja/9ee152916f026b8f2907597164a0b780 to your computer and use it in GitHub Desktop.
Save marvin-kolja/9ee152916f026b8f2907597164a0b780 to your computer and use it in GitHub Desktop.
Commit Count
# This command counts the total number of commits in the current Git repository up to the current HEAD.
# The `HEAD` pointer can be substituted with a specific commit hash or branch name to count up to that point.
#
# Usage Example: This command is particularly useful in scenarios such as automatically incrementing
# the build number in iOS or Android app projects.
git rev-list --count HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment