|
| 1 | +# Git Branch Detailed Guide |
| 2 | + |
| 3 | +## Branch Types in Detail |
| 4 | + |
| 5 | +### feat (New Feature) |
| 6 | + |
| 7 | +``` |
| 8 | +feat/{feature-name} |
| 9 | +``` |
| 10 | + |
| 11 | +- Used when developing a new feature |
| 12 | +- Examples: `feat/use-debounce`, `feat/add-keyboard-height-hook` |
| 13 | + |
| 14 | +### fix (Bug Fix) |
| 15 | + |
| 16 | +``` |
| 17 | +fix/{fix-description} |
| 18 | +``` |
| 19 | + |
| 20 | +- Used when fixing a bug |
| 21 | +- Examples: `fix/ssr-hydration-mismatch`, `fix/scroll-direction-cleanup` |
| 22 | + |
| 23 | +### chore (Config/Build) |
| 24 | + |
| 25 | +``` |
| 26 | +chore/{description} |
| 27 | +``` |
| 28 | + |
| 29 | +- Used when changing build config, CI, dependencies, etc. |
| 30 | +- Examples: `chore/update-build-config`, `chore/add-changesets` |
| 31 | + |
| 32 | +### docs (Documentation) |
| 33 | + |
| 34 | +``` |
| 35 | +docs/{description} |
| 36 | +``` |
| 37 | + |
| 38 | +- Used when adding or modifying documentation |
| 39 | +- Examples: `docs/add-use-toggle-example`, `docs/update-contributing` |
| 40 | + |
| 41 | +### refactor (Refactoring) |
| 42 | + |
| 43 | +``` |
| 44 | +refactor/{description} |
| 45 | +``` |
| 46 | + |
| 47 | +- Used for code refactoring |
| 48 | +- Examples: `refactor/cleanup-internals`, `refactor/simplify-hook-logic` |
| 49 | + |
| 50 | +## Naming Conversion Rules |
| 51 | + |
| 52 | +| Input | Output | |
| 53 | +| --------------------------- | ---------------------- | |
| 54 | +| user authentication feature | user-authentication | |
| 55 | +| SSR hydration error | ssr-hydration-mismatch | |
| 56 | +| update build config | update-build-config | |
| 57 | + |
| 58 | +## Cautions |
| 59 | + |
| 60 | +- No special characters allowed (only hyphens) |
| 61 | +- Avoid overly long branch names (3-4 words recommended) |
| 62 | +- If there are uncommitted changes, stash or commit before creating a branch |
0 commit comments