Skip to content

Instantly share code, notes, and snippets.

@trlinkin
Last active August 29, 2015 14:00
Show Gist options
  • Save trlinkin/bd73a85a231d7c12fe09 to your computer and use it in GitHub Desktop.
Save trlinkin/bd73a85a231d7c12fe09 to your computer and use it in GitHub Desktop.
[master]
config_version = git --work-tree=$confdir/environments/$environment/ --git-dir=/$confdir/environments/$environment/.git/ log --short -n 1
@arusso
Copy link

arusso commented Sep 22, 2014

These should work --

Short hash:

git --work-tree=$confdir/environments/production/ --git-dir=/$confdir/environments/production/.git/ log --format="%h" -n1

Long hash:

git --work-tree=$confdir/environments/production/ --git-dir=/$confdir/environments/production/.git/ log --format="%H" -n1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment