Som-Energia/SomCommonSkills / git-branch
git-branch
VerifiedCrea branques de git seguint convencions de naming: IMP_, FIX_, MOD_, ADD_, etc. Trigger: Quan necessites crear una branca nova per treballar.
When to Use
Utilitza aquesta skill quan:
- Començar a treballar en una nova feature
- Corregir un bug
- Fer qualsevol canvi que requerixi una branca separada
Convencions de Naming
El format és: <type>_<description>
Tipus de Branca
| Prefix | Tipus | Descripció |
|---|---|---|
| IMP_ | Improvement | Millora d funcionalitat existent |
| FIX_ | Bug Fix | Correcció de bug |
| MOD_ | Modification | Canvi de comportament |
| ADD_ | Addition | Afegir nova funcionalitat |
| REF_ | Refactor | Refactorització sense canvi funcional |
| TEST_ | Test | Afegir o corregir tests |
| DOCS_ | Documentation | Canvis de documentació |
| CI_ | CI/CD | Canvis a pipelines |
Regles
- Descripció: 2-3 paraules en anglès, lowercase
- Separador: Guió baix (_) entre tipus i descripció
- Espais: Utilitzar guions (-) dins la descripció si cal
- Longitud: Màxim 50 caràcters
Workflow
Pas 1: Actualitzar main/master
git fetch origin
git pull origin main
Pas 2: Crear branca nova
git checkout -b <type>_<description>
Pas 3: Fer canvis i commit
(Utilitza la skill git-commit)
Pas 4: Fer push
git push -u origin <branch_name>
Exemples
# Nova funcionalitat
git checkout -b ADD_user_registration
# Millora
git checkout -b IMP_payment_validation
# Bug fix
git checkout -b FIX_invoice_total_calculation
# Canvi de comportament
git checkout -b MOD_renewal_process
# Refactor
git checkout -b REF_extract_partner_service
# Tests
git checkout -b TEST_contract_validation
# Documentació
git checkout -b DOCS_api_reference
Errors Comuns
| Error | Causa | Solució |
|---|---|---|
| Branch already exists | Branca ja existent | Canvia el nom o elimina la branca existent |
| Invalid branch name | Caràcters invàlids | Utilitza només lletres, números, guions i guions baixos |
| Not on main | No estàs a main | git checkout main abans de crear branca |
Integració amb SDD
Aquesta skill s'utilitza a les fases:
sdd-propose: Per crear branca des del proposalsdd-apply: Per crear branca de treball
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |