Skip to content

Instantly share code, notes, and snippets.

View ogrotten's full-sized avatar
☠️

Darrin Lowery ogrotten

☠️
  • Kansas City, MO
View GitHub Profile
@sg-s
sg-s / automatic-version-numbers.md
Last active March 3, 2024 10:07
Automatic version numbers of your git repository using git hooks

Put this in a file called pre-commit in .git/hooks/

#!/bin/sh
# To enable this hook, rename this file to "pre-commit".

git rev-list --count master > build_number
git add build_number