list tags and branch git log code example Example 1: git find out commit for tag $ git rev-list -n 1 $TAG Example 2: git log grep git log --all --grep='Build 0051'