When your app evolves into its own reusable template:
geet template # creates .MyApp/ layer
geet template sk2 # creates .sk2/ layerThis:
- 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.
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
-
Start with base template:
geet clone github.com/you/base-template MyApp cd MyApp -
Build on top of it:
# Add app-specific features git add . git commit -m "Add custom features"
-
Promote to new template:
geet template mycompany # Edit .mycompany/.geetinclude to define what to share # Commit to .mycompany layer
-
Publish new template:
cd .mycompany geet gh pub -
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
- Base template features (from
# 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.