get commit details of current branch code example Example: git get current commit hash git rev-parse HEAD