Implement commit with diff