Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .cursor/rules/git-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ alwaysApply: true

# Git workflow — branch + PR only

`main` is protected. **Never `git push` directly to `main`**, even if you have
bypass permissions. Every change must go through a pull request.
The owner uses **SSH** remotes (`git@github.com:...`) and **`main`** as the only
integration branch. **`main` is protected.** Never `git push` directly to
`main`, even if you have bypass permissions. Every change must go through a
pull request and merge on GitHub.

See `AGENTS.md` for the full canonical version. Short form:

Expand Down
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Instructions for **AI coding agents** (Cursor, Claude Code, Codex, Copilot, etc.

---

## Owner defaults (read first)

- **Remote:** Use **SSH** — `git@github.com:kaiiiichen/kaichen.dev.git`. If `origin` is HTTPS and push fails with “could not read Username”, set: `git remote set-url origin git@github.com:kaiiiichen/kaichen.dev.git`.
- **Default branch:** Always **`main`** (not `master`).
- **Merge policy:** **Open a PR and merge through GitHub** every time — no direct pushes to `main`, even when the agent could technically push.

---

## Git workflow — always branch + PR

**Never push directly to `main`.** Treat `main` as protected: every change goes through a **pull request** with CI green. Even with bypass permissions, use the PR flow unless the repository owner explicitly overrides with a written reason.
Expand Down
Loading