Package: gimera
Welcome to GIMERAAdvanced handling of submodules by integrating them or handling as submodules as you know
but provide auto merge functions of hotfixes from other repositories or inside.Rule of thumb:no data is lost, it is safe to call gimera.
If there are staged files, gimera wont continue.During run of gimera commits are done for example after pulling submodules or updating
local paths.How to install:pipxinstallgimera
gimeracompletion(Followinstructions)How to use:Put gimera.yml into your root folder of your project:common:vars:VERSION:'15.0'repos:# make ordinary git submodule:-url:"https://github.com/foo/bar"branch:branch1_${VERSION}path:roles/sub1patches:[]type:submodule# default Trueenabled:True# instead of submodule put the content directly in the repository;# apply patches from local git repository-url:"https://github.com/foo/bar"branch:branch1path:roles2/sub1patches:-'roles2/sub1_patches'type:integratedignored_patchfiles:-file1.patch-roles2/sub1_patches/file1.patch# apply patches from another remote repository#-url:"https://github.com/foo/bar"branch:branch1path:roles2/sub1remotes:remote2:https://github.com/foo2/bar2merges:-remote2 main-origin refs/pull/1/headtype:integratedPatches and remote merges may be combined.Then execute:gimeraapplyHow to make a patchfile:From the example above:edit roles2/sub1/file1.txtgimeraapplyThen a patch file is created as suggestion in roles2/sub1_patches which you may commit and push.Re-Edit patch file:gimeraedit-patchfile1.patchfile2.patchby this, you can combine several patch files into one againHow to fetch only one or more repo:gimeraapplyrepo_pathrepo_path2repo_path3`How to fetch latest versions:gimeraapply--updateLatest versions are pulled and patches are applied.Force Integrated or Submodule mode for repo and subrepositoriesUse Case: you have an integrated repository. Now you want to turn it into submodule,
to easily commit and push changes. Then you do:gimeraapply<path>-SNow although it is configured as integrated, it is now a submodule.After that you can go back to default settings or force integrated mode.
You should call update to pull the latest version.gimeraapply<path>-I--updateDeliver Patches with reused submodules.In the submodule:gimera.ymlcommon:patches:-patches/${VERSION}The main gimera which integrates the submodule should be:common:vars:VERSION:15.0repos:type:integratedurl:.....path:sub1After that a recursive gimera is required.gimera apply -rNote:This way is ok for small sized patches. If patches grow and grow one useful recommendation is to use
github workflows to rebase version branches from main automatically again and apply all changes.This is a sample workflow github:name: Deploy fixes to other versions with rebase main

on:
  push:
    branches:
      - main

permissions: write-all

jobs:
  deploy-subversions:
    uses: Odoo-Ninjas/git-workflows/.github/workflows/deploy_to_subversions.yml@v1
    with:
      branches: "11.0 12.0 13.0 14.0 15.0 16.0"Demo VideosEdit existing patch file and update it![Patching Gimera]gimera commit commandCase: you change code inside an integrated submodule and want to easily commit this.
Just dogit commit path branch messageHow it works:a patch file is createdthe repo is clonedpatch file is appliedif something conflicts, then it is reported and you have to decide what to doContributorsMarc Wimmer (marc@zebroo.de)Michael Tietz (mtietz@mt-software.de)Walter Saltzmanninstall directlypipinstallgit+https://github.com/marcwimmer/gimera