grep git the last commit hash


git log -n1|head -n1|grep -o '[[:xdigit:]]\{7,\}'

Advertisements