Created
November 8, 2017 16:26
-
-
Save raj-uimatic/5c347f154856f8e197014d64f622dee7 to your computer and use it in GitHub Desktop.
git head data for php site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$head = exec("git log -1 --pretty=format:'%h - (%ci)' --abbrev-commit"); | |
$msg = exec("git log -1 --pretty=format:'%s ' --abbrev-commit"); | |
echo "$head - $msg"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment