Encode commits