Implement commit command.