Search code examples
gitworkflowversiongit-submodulestrunk

Workflow: git-repository with sub-modules to release


My git project (a Wordpress-Plugin) contains some 3rd party submodules with extra files (language .po files, /tests folder, coverage.cover) that are not needed in release versions.

Is there a command/workflow that strips all of these files automatically for releases?


Solution

  • The release management process differs from the source control management (here Git and its submodule)

    If your deployment process is to simply checkout the content of a Git repo (and its submodule, with a git submodule update --init --recursive), then no, there is nothing native to Git that would strip out the non-needed part of those subrepos.
    You would need to call an additional script (made for fine-tuning the deployment), which would take care of that step.