code: private int checkInInternal() {
  
          m_logStream.println("[" + new Date() + "] STARTING Git task");
          m_logStream.println("=========================");
          m_logStream.println();
  
          if (m_checkout) {
              m_logStream.println("Running checkout script");
  
          } else if (!(m_resetHead || m_resetRemoteHead)) {
              m_logStream.println("Exporting relevant modules");
              m_logStream.println("--------------------------");
              m_logStream.println();
  
              exportModules();
  
              m_logStream.println();
              m_logStream.println("Calling script to check in the exports");
              m_logStream.println("--------------------------------------");
              m_logStream.println();
  
          } else {
  
              m_logStream.println();
              m_logStream.println("Calling script to reset the repository");
              m_logStream.println("--------------------------------------");
              m_logStream.println();
  
          }
  
          int exitCode = runCommitScript();
          if (exitCode != 0) {
              m_logStream.println();
              m_logStream.println("ERROR: Something went wrong. The script got exitcode " + exitCode + ".");
              m_logStream.println();
          }
          if ((exitCode == 0) && m_checkout) {
              boolean importOk = importModules();
              if (!importOk) {
                  return -1;
              }
          }
          m_logStream.println("[" + new Date() + "] FINISHED Git task");
          m_logStream.println();
          m_logStream.close();
  
          return exitCode;
      }
docs: Export modules and check them in. Assumes the log stream already open.
  @return exit code of the commit-script.