Skip to content

Instantly share code, notes, and snippets.

@migcosta
Last active May 15, 2019 12:33
Show Gist options
  • Save migcosta/689a09d18b65f569e3e61a9bbbdd8a83 to your computer and use it in GitHub Desktop.
Save migcosta/689a09d18b65f569e3e61a9bbbdd8a83 to your computer and use it in GitHub Desktop.
GIT: create a version file for non versioning users (it will need a new commit)
#! /bin/bash
#file location .git/hooks/
filename="$(git rev-parse --show-toplevel)/version.txt";
DATE=`date +%Y%m%d-%H%M%S`
#DATE=`date +%T`
echo "$DATE" > "$filename";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment