From 03d689873a5c365bf1868a97e7bff74fab25e32a Mon Sep 17 00:00:00 2001 From: HakaiTech <124627421+hakaitech@users.noreply.github.com> Date: Mon, 25 May 2026 11:19:44 +0530 Subject: [PATCH] docs(claude-md): make git workflow contributor-agnostic (#2568) Co-authored-by: Steven Enamakel --- CLAUDE.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 24c4eb2c5..85ef115a9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -270,11 +270,30 @@ Tauri/Rust in the shell is a **delivery vehicle** (windowing, process lifecycle, ## Git workflow -- **Never write code on `main`.** Before making any code changes, fork a new branch off the latest `main` (`git fetch upstream && git checkout -b upstream/main`). All work happens on that feature branch; `main` stays clean and only advances via merged PRs. +This file is loaded into every contributor's Claude Code session, so the instructions below are written generically: `` means **your** GitHub username (the owner of your fork), not any specific maintainer. Adapt the literal commands accordingly. + +**One-time remote setup.** Contribute via your own fork of `tinyhumansai/openhuman`. Recommended remote layout: + +``` +origin git@github.com:/openhuman.git (your fork — push here) +upstream git@github.com:tinyhumansai/openhuman.git (fetch-only; never push) +``` + +If you cloned the upstream directly, fix it once: + +```bash +git remote rename origin upstream +git remote add origin git@github.com:/openhuman.git +git fetch upstream +``` + +See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full new-contributor walkthrough. + +- **Never write code on `main`.** Before making any code changes, branch off the latest upstream `main` (`git fetch upstream && git checkout -b upstream/main`). All work happens on that feature branch; `main` stays clean and only advances via merged PRs. - Issues and PRs on upstream **[tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman)** — not a fork — unless explicitly told otherwise. - Issue templates: [`.github/ISSUE_TEMPLATE/feature.md`](.github/ISSUE_TEMPLATE/feature.md), [`.github/ISSUE_TEMPLATE/bug.md`](.github/ISSUE_TEMPLATE/bug.md). PR template: [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md). AI-authored text should follow them verbatim. -- PRs target **`main`**. -- **Push branches to `origin` (the user's fork — `senamakel/openhuman`), never to `upstream` (`tinyhumansai/openhuman`).** PRs are still opened against `tinyhumansai/openhuman:main`, but with `--head senamakel:` so the source is the fork. Direct pushes to upstream pollute its branch list and skip code-review boundaries. Treat the `upstream` remote as fetch-only. +- PRs target **`main`** of `tinyhumansai/openhuman`. +- **Push branches to `origin` (your fork), never to `upstream` (`tinyhumansai/openhuman`).** PRs are opened against `tinyhumansai/openhuman:main` with `--head :` so the source is the fork. Direct pushes to upstream pollute its branch list and skip code-review boundaries. Treat the `upstream` remote as fetch-only. - **When the user asks you to push or open a PR, resolve blockers and push — don't prompt for permission.** If a pre-push hook fails on something unrelated to your changes (e.g. pre-existing breakage on `main` in code you didn't touch), push with `--no-verify` and call it out in the PR body. If the hook fails on your own changes, fix them and push again. Don't ask the user whether to bypass — just do the right thing and tell them what you did. ---