copies and commits