Replace commit with apply