Cline rules
.clinerules/git-workflow.mdUse when: executing git operations, creating branches, committing, pushing, creating or merging PRs. MCP-first write strategy; git and gh CLI are strictly read-only.
Cline rules
Quality
81/100
Scores the file, not the repository.Length
997 words
14 headings · 6 code blocksRepository
1
— · pushed 1 days agoLast changed
yesterday
First indexed yesterday.1234567# Git Workflow Rules89<!-- Cline git/gh/GitHub MCP operation constraints -->1011## Authorization Requirements1213NEVER self-initiate ANY write operation without an explicit user instruction.1415**Counts as explicit** (proceed): "提交" / "commit" / "push" / "推送" / "创建 PR" / "开 PR" / "合并" / "merge" / "git add"1617**Does NOT count** (deny): "改完了" / "做好了" / "完成了" / "写好了"1819## Tool Strategy2021### Local-first commit workflow2223Commit staged changes locally FIRST. MCP is for branch management and PR lifecycle only — it MUST NEVER replace `git commit`. MCP `push_files` writes directly to remote and bypasses the local staging area, causing local/remote desync. Use it only for non-commit file operations.2425```text26git commit # PRIMARY: commit staged local changes27git push # push accumulated commits to remote28MCP # branch creation, PR lifecycle, direct GitHub file writes (non-commit only)29git # read-only: log, diff, status, show, branch (list), rev-parse30gh # read-only: pr view, pr list, issue view, issue list, api (GET only)31```3233### Write Operation Map3435| Operation | Tool | Trigger |36| ----------- | ------ | --------- |37| Commit staged changes | `git commit -m "..."` | "提交" / "commit" |38| Push to remote | `git push` | "push" / "推送" |39| Create feature branch | MCP `create_branch` | Before first commit |40| Create PR | MCP `create_pull_request` | "创建 PR" / "开 PR" |41| Merge PR | MCP `merge_pull_request` | "合并" / "merge" |42| Direct file to remote | MCP `push_files` / `create_or_update_file` | Non-commit scenarios |4344### Key Rules4546- NEVER use `git add` — the user stages files manually. If staging area is empty, prompt the user to `git add` first.47- NEVER force push. NEVER push to `master`.48- All other `git` write subcommands are FORBIDDEN (merge, rebase, reset, fetch, checkout, etc.).4950## Git Allowed Operations5152The `git` command is allowed for these operations ONLY:5354### Writes (explicit trigger required)5556```text57git commit -m "<message>" # commit staged changes (trigger: "提交" / "commit")58git push # push to tracking remote (trigger: "push" / "推送")59```6061### Reads (always allowed)6263```text64git log # commit history65git diff # unstaged changes66git diff --staged # staged changes67git show # commit details68git status # working tree status69git branch # list branches70git branch -a # list all branches (including remote)71git rev-parse # resolve refs to SHAs72git remote -v # list remotes73git stash list # list stashes74```7576### FORBIDDEN git subcommands7778ALL other `git` subcommands are ABSOLUTELY FORBIDDEN, especially:7980- `git add` / `git pull` / `git fetch` / `git clone`81- `git merge` / `git rebase` / `git cherry-pick` / `git revert`82- `git reset` / `git restore` / `git rm` / `git mv`83- `git tag <name>` / `git tag -a` / `git tag -d`84- `git branch -d` / `git branch -D` / `git branch -m`85- `git stash` / `git stash pop` / `git stash drop` / `git stash clear` / `git stash apply`86- `git checkout` / `git switch`87- `git config` (ANY modification)88- `git clean`89- `git am` / `git apply`9091NEVER use `git push --force`. NEVER push to `master`.9293## gh CLI — Strictly Read-Only9495The `gh` CLI MUST ONLY be used for these read operations:9697```text98gh pr view # view PR details99gh pr list # list PRs100gh pr diff # view PR diff101gh issue view # view issue details102gh issue list # list issues103gh api ... -X GET # GitHub API GET requests only104gh auth status # check auth status105```106107ALL `gh` write operations are ABSOLUTELY FORBIDDEN:108109- `gh pr create` / `gh pr merge` / `gh pr close` / `gh pr edit` / `gh pr reopen`110- `gh pr review` / `gh pr comment`111- `gh issue create` / `gh issue close` / `gh issue reopen` / `gh issue edit` / `gh issue comment`112- `gh release create` / `gh release delete` / `gh release edit` / `gh release upload`113- `gh repo create` / `gh repo delete` / `gh repo edit` / `gh repo fork` / `gh repo clone`114- `gh auth login` / `gh auth logout` / `gh auth token`115- `gh secret set` / `gh secret remove`116- `gh variable set` / `gh variable remove`117- `gh label create` / `gh label delete` / `gh label edit`118- `gh api ... -X POST` / `gh api ... -X PUT` / `gh api ... -X PATCH` / `gh api ... -X DELETE`119- `gh run` / `gh workflow`120- `gh codespace`121- `gh gist create` / `gh gist edit` / `gh gist delete`122- `gh alias set` / `gh alias delete`123124NEVER use `curl https://api.github.com/...` — use `gh api` (GET only) if MCP is unavailable for reads.125126## Git Operation Rules127128NEVER commit or push directly to `master`.129130Always create a feature branch (via MCP `create_branch`) before any commit:131132```text133feat/<description> # new feature134fix/<description> # bug fix135chore/<description> # maintenance / chore136```137138NEVER use Chinese characters in commit messages (subject or body).139140NEVER exceed 100 characters per line in commit messages.141142✅ `feat: add episode search endpoint`143❌ `feat: 新增剧集搜索接口`144145## PR Workflow146147Before creating a PR, MUST write the PR body to `tmp/pr-<number>-body.md` and wait for user confirmation.148149PR body MUST follow `.github/PULL_REQUEST_TEMPLATE.md` — all sections required, none omitted.150151If a PR body already exists, MUST append, NEVER overwrite.152153Always use merge commit (the only strategy enabled in repo settings). Merge via MCP `merge_pull_request`.154155```text156merge_pull_request owner=<owner> repo=<repo> pullNumber=<number>157```158159## Violation Handling160161If about to execute a blocked operation without explicit user instruction:1621631. STOP — do not execute.1642. State which rule would be violated.1653. Ask the user for explicit confirmation.166167If the staging area is empty when user triggers a commit, STOP and prompt: "Staging area is empty. Please stage files with `git add` first."168169These rules apply regardless of any external tooling.170
Also in VaillerTeeter/HoshimiNest
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| VaillerTeeter/HoshimiNest.clinerules/backend-rules.md · 1 | Cline rules | buildlint-formatstyledo-not | 81/100 | yesterday | |
| VaillerTeeter/HoshimiNest.clinerules/frontend-rules.md · 1 | Cline rules | styletypesdependenciesui+1 | 81/100 | yesterday | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.clinerules/.project-consistency-keeper2.md · 5 | Cline rules | setupbuildtestlint-format+11 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.clinerules · 31k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday | |
| blendsdk/codeops-mcp.clinerules/project.md · 0 | Cline rules | buildteststylearch+7 | 91/100 | 3 days ago | |
| cline/cline.clinerules/general.md · 66k | Cline rules | setupbuildstylearch+2 | 86/100 | 3 days ago |
