how to get first commit in git code example Example: git check first commit git rev-list --max-parents=0 HEAD