Sort commits