Promotion
Promotion is the only path from ephemeral work to durable storage.
Promotion guarantees:
- Human-only operation.
- Selective (hunks/files/all).
- Synthetic commits from accepted changes.
- Baseline conflict checks before apply.
If durable HEAD moved and overlaps touched files, GitTrix raises BaselineConflictError.
Promotion strategies
Section titled “Promotion strategies”commitbranchprpatchauto(heuristic + preference resolution)
flowchart TD
P["Promote session changes\ngittrix promote <session-id>"]
subgraph Strategies[Promotion strategies]
A["Auto\nGitTrix picks the path"]
C["Commit\nWrite one clean commit"]
B["Branch\nSend changes to a branch"]
PR["Pull Request\nOpen a PR"]
PT["Patch\nExport a patch file"]
end
BR["Optional flag\n--branch=<name>"]
P --> A
P --> C
P --> B
P --> PR
P --> PT
B -. optional .-> BR
PR -. optional .-> BR
classDef command fill:#eef4ff,stroke:#2855a6,color:#10284f,stroke-width:1px
classDef strategy fill:#f7f7f8,stroke:#374151,color:#111827,stroke-width:1px
classDef option fill:#fff7ed,stroke:#9a3412,color:#7c2d12,stroke-width:1px
class P command
class A,C,B,PR,PT strategy
class BR option