Skip to content

Instantly share code, notes, and snippets.

@jshbrntt
Created February 24, 2014 17:20
Show Gist options
  • Save jshbrntt/9192631 to your computer and use it in GitHub Desktop.
Save jshbrntt/9192631 to your computer and use it in GitHub Desktop.
Hook for writing latest repository short-hash to text file.
#!/bin/sh
rm www/version.txt -i
cat /dev/null > www/version.txt
git rev-parse --short HEAD >> www/version.txt
git add www/version.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment