docs: Add Auto Claude configuration and merge conflict resolution guide
- Document Auto Claude state files that should never be committed - Add pre-commit hook that automatically unstages Auto Claude files - Include troubleshooting steps for merge conflicts - Document worktree management commands This prevents future merge conflicts caused by .auto-claude-* files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7d1df82d76
commit
539b6f40bc
63
CLAUDE.md
63
CLAUDE.md
@ -192,6 +192,69 @@ ssh maciejpi@10.22.68.249 "cd /var/www/nordabiznes && sudo -u www-data git pull
|
|||||||
- **User:** www-data
|
- **User:** www-data
|
||||||
- **SSL verify:** disabled (`git -c http.sslVerify=false`)
|
- **SSL verify:** disabled (`git -c http.sslVerify=false`)
|
||||||
|
|
||||||
|
## Auto Claude - Konfiguracja i rozwiązywanie problemów
|
||||||
|
|
||||||
|
### Pliki stanu Auto Claude (WAŻNE!)
|
||||||
|
|
||||||
|
Auto Claude tworzy lokalne pliki stanu które **NIE POWINNY** być commitowane:
|
||||||
|
- `.auto-claude-security.json` - stan bezpieczeństwa projektu
|
||||||
|
- `.auto-claude-status` - status bieżącego zadania
|
||||||
|
- `.auto-claude/` - katalog roboczy Auto Claude
|
||||||
|
|
||||||
|
**Problem:** Auto Claude czasami dodaje te pliki do staging area w worktree branches, co powoduje konflikty merge gdy branch jest mergowany do master.
|
||||||
|
|
||||||
|
**Rozwiązanie (wdrożone 2026-01-10):**
|
||||||
|
|
||||||
|
1. **`.gitignore`** - pliki są ignorowane:
|
||||||
|
```
|
||||||
|
.auto-claude/
|
||||||
|
.auto-claude-security.json
|
||||||
|
.auto-claude-status
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Pre-commit hook** - automatycznie usuwa te pliki ze staging area:
|
||||||
|
```
|
||||||
|
.git/hooks/pre-commit
|
||||||
|
```
|
||||||
|
Hook sprawdza przed każdym commitem czy pliki Auto Claude są staged i automatycznie je usuwa.
|
||||||
|
|
||||||
|
3. **Pliki usunięte z śledzenia** - wykonano `git rm --cached` na master
|
||||||
|
|
||||||
|
### Rozwiązywanie konfliktów merge z Auto Claude
|
||||||
|
|
||||||
|
Jeśli pojawi się konflikt merge z plikami `.auto-claude-*`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Sprawdź czy to konflikt zmiana/usunięcie
|
||||||
|
git status
|
||||||
|
|
||||||
|
# 2. Usuń pliki Auto Claude z merge (akceptuj usunięcie z master)
|
||||||
|
git rm .auto-claude-security.json .auto-claude-status
|
||||||
|
|
||||||
|
# 3. Dokończ merge
|
||||||
|
git commit -m "Merge branch 'feature' - resolve Auto Claude file conflicts"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Worktrees Auto Claude
|
||||||
|
|
||||||
|
Auto Claude tworzy worktrees dla każdego zadania w:
|
||||||
|
```
|
||||||
|
.auto-claude/worktrees/tasks/<task-id>/
|
||||||
|
```
|
||||||
|
|
||||||
|
Każdy worktree ma własny branch i własne pliki stanu. Po zamergowaniu zadania worktree może być usunięty.
|
||||||
|
|
||||||
|
**Sprawdzenie aktywnych worktrees:**
|
||||||
|
```bash
|
||||||
|
git worktree list
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usunięcie nieaktualnego worktree:**
|
||||||
|
```bash
|
||||||
|
git worktree remove .auto-claude/worktrees/tasks/<task-id>
|
||||||
|
git branch -d auto-claude/<task-id>
|
||||||
|
```
|
||||||
|
|
||||||
## Konwencje danych
|
## Konwencje danych
|
||||||
|
|
||||||
### Identyfikatory firm
|
### Identyfikatory firm
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user