Files
Rules/.cursor/rules/no-cursor-in-repositories.mdc
T
PapaTramp 3adf0c5211 Добавить Cursor rules, init-cursor и скрипты настройки git remotes.
Канонический источник для клонирования в $HOME\CursorRules на новых ПК.
2026-06-18 09:51:39 +10:00

51 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: Не коммитить .cursor/ и IDE-файлы в git-репозитории
alwaysApply: true
---
# Cursor не попадает в git
В **коммитах и tracked-файлах** запрещено добавлять артефакты Cursor как IDE/агента.
## Запрещено коммитить
| Путь | Назначение |
|------|------------|
| **`.cursor/`** | rules, hooks, hooks.json, settings — только локально |
| **`.cursorignore`** | индексация IDE, не часть продукта |
| **`AGENTS.md`**, **`CURSOR.md`** | служебные файлы IDE |
Не создавать `.cursor/hooks/` с auto-push/auto-commit в репозиториях проекта.
## Обязательно в `.gitignore` каждого репо
```gitignore
.cursor/
.cursorignore
```
При работе в репозитории: если строк нет — **добавить в том же коммите**, что и код, **не** коммитить сами `.cursor/`.
После `init-cursor` (копирование rules в проект) — rules остаются **локально** и **не попадают** в `git add`.
## Перед `git commit` / `git push`
1. `git status` — в staged **нет** `.cursor/` и `.cursorignore`.
2. **Не** использовать `git add -A` / `git add .` без проверки.
3. Если `.cursor` уже в индексе: `git rm -r --cached .cursor` и `git rm --cached .cursorignore`.
4. `git ls-files` — не должно быть путей, начинающихся с `.cursor`.
## Запрещено в тексте коммитов и docs
- Упоминания Cursor IDE, Cursor Agent, cursoragent, cursor.com, cursor.sh.
- Trailers: Co-authored-by: Cursor, Made-with: Cursor.
## Разрешено (не путать с IDE)
- CSS cursor: pointer; poll cursor, DB cursor, Console.CursorLeft, MOEX analytics.cursor.
## Git / GitHub
- Author и committer — Andrey Lutsenko, без co-author Cursor.
- Перед push в public: git log --format=fuller, поиск cursoragent / Co-authored-by: Cursor.