git rev-parse

Table of Contents

git rev-parse reference

Get the git root directory howto

git rev-parse --show-toplevel

Get the short hash howto

git rev-parse --short HEAD