Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 1.92 KB

File metadata and controls

92 lines (70 loc) · 1.92 KB

Multi-layered repos

Extending a template as a new template

When your app evolves into its own reusable template:

geet template           # creates .MyApp/ layer
geet template sk2       # creates .sk2/ layer

This:

  • copies tooling from base layer
  • installs include/exclude sample
  • initializes a new template git repo

Users can now clone that template and benefit from both layers.

How layers stack

MyApp/
  .git/              # app repo (your work)

  .geet/             # base template layer
    dot-git/
    .geetinclude     # defines what base template tracks

  .sk2/              # extended template layer
    dot-git/
    .geetinclude     # defines what this extension tracks

Each layer:

  • Has its own git repo (separate dot-git/)
  • Tracks its own subset of files
  • Can be pulled independently
  • Can be pushed independently

Example workflow

  1. Start with base template:

    geet clone github.com/you/base-template MyApp
    cd MyApp
  2. Build on top of it:

    # Add app-specific features
    git add .
    git commit -m "Add custom features"
  3. Promote to new template:

    geet template mycompany
    # Edit .mycompany/.geetinclude to define what to share
    # Commit to .mycompany layer
  4. Publish new template:

    cd .mycompany
    geet gh pub
  5. Others can now use your extended template:

    geet clone github.com/you/mycompany-template NewApp

    They get:

    • Base template features (from .geet/)
    • Your extensions (from .mycompany/)
    • Can pull updates from both independently

Updating layers independently

# Pull base template updates
./.geet/lib/cli.sh git pull
git commit -am "Update base template"

# Pull extended template updates
./.mycompany/lib/cli.sh git pull
git commit -am "Update company template"

Layers stack cleanly and can evolve independently.