code: private void exportModules() {
  
          // avoid to export modules if unnecessary
          if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
              || ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
              m_logStream.println();
              m_logStream.println("NOT EXPORTING MODULES - you disabled copy and unzip.");
              m_logStream.println();
              return;
          }
          CmsModuleManager moduleManager = OpenCms.getModuleManager();
  
          Collection<String> modulesToExport = ((m_modulesToExport == null) || m_modulesToExport.isEmpty())
          ? m_currentConfiguration.getConfiguredModules()
          : m_modulesToExport;
  
          for (String moduleName : modulesToExport) {
              CmsModule module = moduleManager.getModule(moduleName);
              if (module != null) {
                  CmsModuleImportExportHandler handler = CmsModuleImportExportHandler.getExportHandler(
                      getCmsObject(),
                      module,
                      "Git export handler");
                  try {
                      handler.exportData(
                          getCmsObject(),
                          new CmsPrintStreamReport(
                              m_logStream,
                              OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject()),
                              false));
                  } catch (CmsRoleViolationException | CmsConfigurationException | CmsImportExportException e) {
                      e.printStackTrace(m_logStream);
                  }
              }
          }
      }
docs: Export the modules that should be checked in into git.