Skip to content

Instantly share code, notes, and snippets.

@denvis
Created February 4, 2014 12:17
Show Gist options
  • Save denvis/8802605 to your computer and use it in GitHub Desktop.
Save denvis/8802605 to your computer and use it in GitHub Desktop.
git version tag file hook
Version file hook
normal repo
cd .git/hooks
nano pre-commit
#!/bin/sh
git describe --always --tag > version.txt
git add version.txt
chmod +x pre-commit
Submodule Repo
inside submodule repo folder
git rev-parse --git-dir
cd "output from above" (/Users/<...>/.git/modules/www/app/Plugin/CategoryManager)
now same steps as in normal repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment