Skip to main content

๐Ÿš€ 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:

  1. Always branch from next: git checkout -b fix/my-issue next
  2. Open PRs targeting next โ€” never target main directly
  3. next โ†’ main happens via a release PR once next is stable
  4. Hotfixes are the only exception โ€” branch from main and open a PR against main

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โ€‹

TypePurpose
featNew feature
fixBug fix
perfPerformance improvement
refactorCode restructure, no behavior change
docsDocumentation only
testTest additions or corrections
ciCI/CD pipeline changes
choreRoutine maintenance
revertRevert a previous commit

Rulesโ€‹

  • Subject line: imperative mood, โ‰ค 72 characters, no trailing period
  • Breaking changes: use ! suffix (feat!:) and add a BREAKING CHANGE: footer
  • Do not add Co-authored-by trailers โ€” 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 (or main for 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.