docs: forbid bare git push; use git-push.sh helpers.

[skip ci]
This commit is contained in:
2026-07-27 23:10:45 +03:00
parent 78d410c3e3
commit b3792a304b
2 changed files with 17 additions and 2 deletions
+14 -2
View File
@@ -47,13 +47,25 @@ npm / npx / node из Windows # сломан
| Front lint/build/e2e | `wsl -e bash` + `cd …/EventHubFront && npm …` |
| Front перед push main | сначала `npm run test:e2e:ift` в WSL, потом `~/.cursor/eventhub/git-push-main.sh` |
| Back rebar/eunit | `source scripts/wsl-dev-env.sh` в WSL |
| Git commit/push | `~/.cursor/eventhub/git-commit.sh` / `git-push.sh` / `git-push-main.sh` |
| Git commit/push | **только** `~/.cursor/eventhub/git-commit.sh` / `git-push.sh` / `git-push-main.sh` |
| JSON/API/python | скрипт `.sh` или `.py` на диске, запуск из WSL |
## Git push (обязательно)
**Запрещено агентам:** `git push`, `git push origin`, `git push origin HEAD` / `master` напрямую — без токена зависают на HTTPS prompt.
**Канон:**
```text
bash ~/.cursor/eventhub/git-push.sh /mnt/c/Users/alexc/IdeaProjects/eventHub/EventHubBack
bash ~/.cursor/eventhub/git-push-main.sh /mnt/c/Users/alexc/IdeaProjects/eventHub/EventHubFront
```
Credential store в WSL уже настроен (`credential.helper=store` + `git.sabilin.com`); хелпер всё равно предпочтителен (явный URL с токеном из secrets).
## Перед push Front
1. WSL: `npm run lint && npm run build` (ловит синтаксис/TS)
2. WSL: `npm run test:e2e:ift`
3. Только потом push. **Не пушить**, если lint/build/IFT красные.
3. Только потом push через `git-push-main.sh`. **Не пушить**, если lint/build/IFT красные.
## Частые сбои (подробнее)
См. **`agent-pitfalls.mdc`**: git `-F` вместо heredoc, `&&` в PS, docker dev scale, `git clean` vs `.cursor/`.