Adding --commit option to script (refs #18194)