code: private int runCommitScript() {
  
          if (m_checkout && !m_fetchAndResetBeforeImport) {
              m_logStream.println("Skipping script....");
              return 0;
          }
          try {
              m_logStream.flush();
              String commandParam;
              if (m_resetRemoteHead) {
                  commandParam = resetRemoteHeadScriptCommand();
              } else if (m_resetHead) {
                  commandParam = resetHeadScriptCommand();
              } else if (m_checkout) {
                  commandParam = checkoutScriptCommand();
              } else {
                  commandParam = checkinScriptCommand();
              }
              String[] cmd = {"bash", "-c", commandParam};
              m_logStream.println("Calling the script as follows:");
              m_logStream.println();
              m_logStream.println(cmd[0] + " " + cmd[1] + " " + cmd[2]);
              ProcessBuilder builder = new ProcessBuilder(cmd);
              m_logStream.close();
              m_logStream = null;
              Redirect redirect = Redirect.appendTo(new File(DEFAULT_LOGFILE_PATH));
              builder.redirectOutput(redirect);
              builder.redirectError(redirect);
              Process scriptProcess = builder.start();
              int exitCode = scriptProcess.waitFor();
              scriptProcess.getOutputStream().close();
              m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, true));
              return exitCode;
          } catch (InterruptedException | IOException e) {
              e.printStackTrace(m_logStream);
              return -1;
          }
  
      }
docs: Runs the shell script for committing and optionally pushing the changes in the module.
  @return exit code of the script.