Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git head data for php site
<?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