---
title: 🚀 Getting Started
description: General contributor setup — branch model, commit conventions, and pull request workflow for all Z-Shell repositories.
canonical_url: https://wiki.zshell.dev/community/contributing/getting_started
markdown_url: https://wiki.zshell.dev/community/contributing/getting_started/index.md
locale: en
source_path: community/00_contributing/01_getting_started.mdx
---

<!-- Generated from the canonical Z-Shell Wiki build. The linked human-facing page remains the editorial source of truth. -->

# 🚀 Getting Started

![](https://wiki.zshell.dev/img/svg/community/contributing-getting-started.svg)

This guide covers the conventions shared across the Z-Shell organization — commit format, pull request workflow, and review expectations. Where a convention differs per repository, such as the branch model below, the guide says so and links the authoritative source. Repo-specific additions (zi, wiki, etc.) are documented in their own sub-pages.

<a id="prerequisites"></a>

## Prerequisites

-   [Git](https://git-scm.com/) ≥ 2.30
-   [Zsh](https://www.zsh.org/) ≥ 5.8
-   A [GitHub](https://github.com/) account

<a id="fork-and-clone"></a>

## Fork and Clone

```sh
# 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
```

<a id="branch-model"></a>

## Branch Model

The organization default is trunk-based development on `main`. Branch from the current `main` and open your pull request into `main`.

Zi uses protected `main` with full stable qualification before every merge. Its former `next` integration model is retired under [ADR 0039](https://github.com/z-shell/.github/blob/main/decisions/0039-zi-main-integration-and-signed-milestones.md). An old `next` reference does not change the contribution target.

Check the repository instructions

Opening a pull request against the wrong base is a common first-time contribution mistake. Read the owning repository's contribution guidance and `AGENTS.md`, and use `main`.

The authoritative per-repository table lives in [ADR 0019: Trunk-on-Main Default](https://github.com/z-shell/.github/blob/main/decisions/0019-trunk-on-main-default.md). At the time of writing:

<table><thead><tr><th>Integration branch</th><th>Repositories</th></tr></thead><tbody><tr><td>trunk on <code>main</code></td><td>all repositories, including <code>zi</code></td></tr></tbody></table>

Consult the ADR rather than this table if the two ever disagree; the ADR is the source of truth, and changing a repository's model requires amending it.

<a id="branch-naming"></a>

### Branch naming

Use an issue-linked organization name, optionally followed by a lowercase `-<slug>` such as `feature-668-pull-requests`:

```text
feature-<issue>  planned features, documentation, refactors, and maintenance
bug-<issue>      non-critical bug fixes
hotfix-<issue>   urgent fixes branched from the stable or deployment ref
```

The `<type>/<slug>` form, with a Conventional Commits type such as `docs/pull-requests-runbook`, is accepted too. Each repository's commit-lint workflow checks the name, and a repository may narrow it: F-Sy-H accepts only `feature-<issue>`, `bug-<issue>` and `hotfix-<issue>`.

**Rules:**

1.  **Branch from current `main`** and open the pull request into `main`.
2.  Keep the branch short-lived and linked to its owning issue.
3.  For Zi, every merge must pass full stable qualification. Hotfixes use the same protected `main` path.

<a id="commit-message-format"></a>

## Commit Message Format

All commits must follow [Conventional Commits](https://www.conventionalcommits.org/):

```text
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
```

<a id="allowed-types"></a>

### Allowed Types

<table><thead><tr><th>Type</th><th>Purpose</th></tr></thead><tbody><tr><td><code>feat</code></td><td>New feature</td></tr><tr><td><code>fix</code></td><td>Bug fix</td></tr><tr><td><code>perf</code></td><td>Performance improvement</td></tr><tr><td><code>refactor</code></td><td>Code restructure, no behavior change</td></tr><tr><td><code>docs</code></td><td>Documentation only</td></tr><tr><td><code>test</code></td><td>Test additions or corrections</td></tr><tr><td><code>ci</code></td><td>CI/CD pipeline changes</td></tr><tr><td><code>chore</code></td><td>Routine maintenance</td></tr><tr><td><code>revert</code></td><td>Revert a previous commit</td></tr></tbody></table>

<a id="rules"></a>

### Rules

-   Subject line: imperative mood, ≤ 72 characters, no trailing period
-   Breaking changes: use `!` suffix (`feat!:`) **and** add a `BREAKING CHANGE:` footer
-   `Co-authored-by` trailers must credit a **real human** — including yourself as the pull request author. **Never credit a bot, AI agent, or automation as a co-author.** `z-shell/.github` and `z-shell/zi` enforce this in CI; the other repositories rely on the author until their own check is live

To tidy commits before opening a PR:

```sh
git rebase -i $(git merge-base HEAD main)
```

<a id="what-not-to-add"></a>

## 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

<a id="pull-request-checklist"></a>

## Pull Request Checklist

Before opening a PR:

-    Branched from current `main`
-    Pull request targets `main`
-    Commits follow Conventional Commits
-    No secrets or AI config files added
-    Relevant docs or tests updated
-    All CI checks pass

<a id="keeping-your-fork-up-to-date"></a>

## Keeping Your Fork Up to Date

```sh
git fetch upstream
git rebase upstream/main
```

<a id="discussion-first"></a>

## Discussion First

Before starting significant work, [open an issue](https://github.com/z-shell/zi/issues/new/choose) to discuss the change. This avoids duplicated effort and ensures alignment with the project roadmap.
