Skip to content

Instantly share code, notes, and snippets.

View kuuup-at-work's full-sized avatar

Peter Kupietz kuuup-at-work

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