Move the "repository commit --clear" functionality into a separate command

fixes #7499