From 1900a6fb6982da7b2d151da4ca25549f417adcdb Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sat, 25 Apr 2026 23:51:32 -0400 Subject: [PATCH] NEO-29: require pulling main before branching Add an explicit git-workflow rule to fetch and pull main before creating new story branches, preventing stale-base branch creation. --- .cursor/rules/git-workflow.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.cursor/rules/git-workflow.md b/.cursor/rules/git-workflow.md index 9fe4f2e..c9ce127 100644 --- a/.cursor/rules/git-workflow.md +++ b/.cursor/rules/git-workflow.md @@ -8,6 +8,7 @@ alwaysApply: true **Agent:** You may **`git commit`** at your discretion while on story/ticket work; do **not** **`git push`** except when the user explicitly asks (see [commit-and-review](commit-and-review.md) **Never push** and **Opening a PR when the user asks**). - **Beginning work on a new Linear issue** — Create a **new branch** as soon as story work starts (planning, implementation, or both). **Branch names must start with the Linear issue id** (e.g. `NEO-6-position-state-api`); see [linear-git-naming](linear-git-naming.md). Stay on that branch for everything scoped to that issue, including **`docs/plans/{KEY}-implementation-plan.md`**, until the story is merged. Do not put ticketed story plans only on `main` while implementation lives on a branch. +- **Branching from `main` requires a fresh pull first** — before creating a new story branch from `main`, run `git fetch origin`, `git checkout main`, and `git pull --ff-only` so the branch starts from the latest remote `main`. Do not branch from a stale local `main`. - **Documentation-only work** — Commit directly on **`main`** when the change is **not** tied to an active Linear issue branch: general Markdown under `docs/` (except per-story implementation plans for an issue you are working on that branch), root and nested `README.md` files, `neon_sprawl_vision.plan.md`, and other cross-cutting prose. No feature branch required.