Skip to content

Instantly share code, notes, and snippets.

@tjunghans
Created February 8, 2024 13:31
Show Gist options
  • Save tjunghans/478969f0aca7ccc3c814336aca4f30b1 to your computer and use it in GitHub Desktop.
Save tjunghans/478969f0aca7ccc3c814336aca4f30b1 to your computer and use it in GitHub Desktop.
Count / collect tagged git commits for a year
On xyz master branch run the following to get the count for the year 2024.
git log --format="%h %an %Cgreen%as%Creset %d" --first-parent --tags --no-walk | grep -c -e '2024'
Omit “-c” to list the entries for 2024:
git log --format="%h %an %Cgreen%as%Creset %d" --first-parent --tags --no-walk | grep -e '2024'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment