git commit-parents

Show the commit’s parents

Git alias:

commit-parents = !"f(){ \
    git cat-file -p \"${*:-HEAD}\" | \
    sed -n '/0/,/^ *$/{/^parent /p}'; \
};f"

Example:

git commit-parents