Git Flow
Branching and commit conventions in Xindeler.
Branchesβ
| Branch | Description |
|---|---|
main | Always stable and deployable. Protected β merges only via approved PR. |
feat/* | New functionality. Created from main, merged into main. |
fix/* | Bug fix. |
chore/* | Refactor, cleanup, dependency updates. |
docs/* | Documentation-only changes. |
There are no develop, staging, or release branches β the model is simplified trunk-based development.
Standard workflowβ
main βββββββββββββββββββββββββββββββββββββββββββΊ main
β β²
ββββ feat/nueva-habilidad ββββββ
(incremental commits)
- Create a branch from an up-to-date
main - Commit frequently on the branch
- Open a PR against
main - Pass review and CI
- Merge into
main(squash or merge commit, at the reviewer's preference)
Commit formatβ
type: short description in lowercase (max. 72 characters)
Optional body explaining why, not what.
The what is explained by the code.
Valid typesβ
| Type | When |
|---|---|
feat | New functionality visible to a player or contributor |
fix | Bug fix |
refactor | Internal change with no behavior change |
chore | Dependencies, CI, configuration |
docs | Documentation only |
test | Add or fix tests |
perf | Performance improvement |
Examplesβ
feat: add parry window to sword combo
fix: correct backstab damage multiplier for rogue
refactor: split CombatSystem into attack and defense phases
docs: document RON format for ability definitions
chore: update quinn to 0.11
Rules for the main branchβ
- No direct pushes β everything goes through a PR
- Requires 1 approval from the maintainer (@Matute289)
- CI must pass (
cargo build,cargo clippy,cargo test) - The maintainer can merge without a PR (bypass) for urgent hotfixes
Conflict resolutionβ
If your branch has diverged from main, rebase instead of merging:
git fetch upstream
git rebase upstream/main
Resolve conflicts file by file, then:
git add <archivo-resuelto>
git rebase --continue
git push origin feat/tu-branch --force-with-lease
Use --force-with-lease instead of --force β it fails if someone else has pushed to your branch in the meantime.