๐ Getting Started
This guide applies to all repositories in the Z-Shell organization. Repo-specific additions (zi, wiki, etc.) are documented in their own sub-pages.
Prerequisitesโ
Fork and Cloneโ
# 1. Fork the repo on GitHub, then clone your fork
git clone https://github.com/<your-username>/<repo>.git
cd <repo>
# 2. Add the upstream remote
git remote add upstream https://github.com/z-shell/<repo>.git
Branch Modelโ
All repositories follow the same two-branch model:
main โโโโ production (tagged releases only)
โ
next โโโโ integration branch โ open all PRs here
โ
โโโ feat/<name> new features
โโโ fix/<name> bug fixes
โโโ perf/<name> performance improvements
โโโ refactor/<name> code refactors
โโโ docs/<name> documentation updates
โโโ ci/<name> CI / workflow changes
Rules:
- Always branch from
next:git checkout -b fix/my-issue next - Open PRs targeting
nextโ never targetmaindirectly nextโmainhappens via a release PR oncenextis stable- Hotfixes are the only exception โ branch from
mainand open a PR againstmain
Commit Message Formatโ
All commits must follow Conventional Commits:
type(scope): short description
Optional body โ explain what and why, not how.
Wrap at 72 characters.
Optional footer(s):
Fixes #123
BREAKING CHANGE: description of what breaks
Allowed Typesโ
| Type | Purpose |
|---|---|
feat | New feature |
fix | Bug fix |
perf | Performance improvement |
refactor | Code restructure, no behavior change |
docs | Documentation only |
test | Test additions or corrections |
ci | CI/CD pipeline changes |
chore | Routine maintenance |
revert | Revert a previous commit |
Rulesโ
- Subject line: imperative mood, โค 72 characters, no trailing period
- Breaking changes: use
!suffix (feat!:) and add aBREAKING CHANGE:footer - Do not add
Co-authored-bytrailers โ this is enforced by CI
To tidy commits before opening a PR:
git rebase -i $(git merge-base HEAD next)
What Not to Addโ
AGENTS.md,CLAUDE.md,GEMINI.md,.cursorrules, or any AI-specific config files- Secrets, credentials, or API tokens of any kind
- Binary files unrelated to the project
Pull Request Checklistโ
Before opening a PR:
- Branched from
next(ormainfor a hotfix) - PR targets
next - Commits follow Conventional Commits
- No secrets or AI config files added
- Relevant docs or tests updated
- All CI checks pass
Keeping Your Fork Up to Dateโ
git fetch upstream
git rebase upstream/next # for feature branches
Discussion Firstโ
Before starting significant work, open an issue to discuss the change. This avoids duplicated effort and ensures alignment with the project roadmap.