if the commit is a initial one, set from_commit to None