git-conflicts
Use when resolving merge or rebase conflicts with step-by-step guided resolution.
Instalar con Codex o Claude Copia este prompt, pรฉgalo en Codex, Claude u otro asistente, y deja que revise la pรกgina de la skill y la instale por ti.
Menรบ
Use when resolving merge or rebase conflicts with step-by-step guided resolution.
Instalar con Codex o Claude Copia este prompt, pรฉgalo en Codex, Claude u otro asistente, y deja que revise la pรกgina de la skill y la instale por ti.
Basado en la clasificaciรณn ocupacional SOC
Use when designing component interaction specs with visual states, transitions, and accessibility requirements. Covers state matrices, responsive behavior, ARIA compliance, and content constraints. Do not use for multi-step user journey mapping (use journey-mapping).
Use when mapping complete user journeys through multi-step flows, onboarding sequences, or feature workflows. Covers entry points, happy paths, alternate paths, error states, friction analysis, and delight opportunities. Do not use for individual component interaction specs (use interaction-design).
Use when analyzing an existing codebase for architecture, tech stack, conventions, and infrastructure. Covers project structure mapping, data model discovery, integration point cataloging, and constraint identification. Do not use for schema changes (use schema-design) or API contract definition (use api-design).
Use when designing documentation architecture for a project or team. Covers audience mapping, Diataxis framework classification, onboarding path design, format and location decisions, documentation testing, and maintenance scheduling. Do not use for recording individual architecture decisions (use adr-template) or creating versioned changelogs (use changelog-design).
Use when auditing codebase patterns or evaluating proposed changes for convention consistency. Covers file naming, component patterns, data fetching, state management, and type conventions. Do not use for test plan design or coverage targets (use testing-strategy).
Use when classifying data elements by sensitivity tier and defining per-tier handling requirements. Covers data inventory, sensitivity classification, PII flow mapping, encryption and masking specifications, and cross-boundary transfer documentation. Do not use for regulatory gap analysis (use compliance-review) or audit logging design (use audit-trail-design).
| name | git-conflicts |
| description | Use when resolving merge or rebase conflicts with step-by-step guided resolution. |
| triggers | ["git conflicts","fix conflicts","resolve conflicts","merge conflicts","conflict help"] |
| version | 1.0.0 |
| user_invocable | true |
git addgit merge --continue or git rebase --continue after resolution--file): reject .. traversal, null bytes, and shell metacharacters. Must be a path within the repository working tree.Get help resolving merge, rebase, or cherry-pick conflicts.
/git-conflicts # Analyze and help with current conflicts
/git-conflicts --status # Show conflict status only
/git-conflicts --file src/component.tsx # Focus on specific file
# Check what operation is in progress
if [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ]; then
OPERATION="rebase"
elif [ -f .git/MERGE_HEAD ]; then
OPERATION="merge"
elif [ -f .git/CHERRY_PICK_HEAD ]; then
OPERATION="cherry-pick"
else
echo "No conflicts detected."
exit 0
fi
# Get list of conflicting files
CONFLICTS=$(git diff --name-only --diff-filter=U)
echo "Conflicting files:"
echo "$CONFLICTS"
# Count conflicts
COUNT=$(echo "$CONFLICTS" | wc -l)
echo "Total: $COUNT files with conflicts"
For each conflicting file, Claude will:
<<<<<<<, =======, >>>>>>>)Provide clear instructions for each file.
Conflict Resolution Guide
Operation: Merging main into feat/dark-mode
Conflicting files (2):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. src/components/Header.tsx
Conflict type: Both branches modified the same lines
Your changes (HEAD):
- Added dark mode toggle button
- Changed header background color
Their changes (main):
- Updated logo component
- Changed header padding
Suggested resolution:
Keep both changes - they affect different aspects.
1. Keep the dark mode toggle (your change)
2. Keep the logo update (their change)
3. Merge the style changes carefully
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. src/styles/theme.css
Conflict type: Same CSS property modified differently
Your changes (HEAD):
--header-bg: #1a1a2e; /* dark mode */
Their changes (main):
--header-bg: #ffffff; /* light mode default */
Suggested resolution:
Both are needed! Create theme variants:
:root {
--header-bg: #ffffff;
}
[data-theme="dark"] {
--header-bg: #1a1a2e;
}
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Next steps:
1. Edit conflicting files (remove conflict markers)
2. git add <resolved-files>
3. git merge --continue (or git rebase --continue)
Or abort:
/git-abort
When focusing on a specific file:
Analyzing: src/components/Header.tsx
Conflict region 1 (lines 45-62):
<<<<<<< HEAD (your changes)
import { ThemeToggle } from './ThemeToggle';
export function Header() {
return (
<header className="bg-slate-900 dark:bg-slate-950">
<Logo />
<ThemeToggle />
=======
import { NewLogo } from './NewLogo';
export function Header() {
return (
<header className="bg-white p-4">
<NewLogo />
>>>>>>> main (their changes)
Analysis:
- You added ThemeToggle import and component
- They updated Logo to NewLogo
- Background colors differ (you: dark, they: light default)
Resolution suggestion:
Combine both changes:
import { ThemeToggle } from './ThemeToggle';
import { NewLogo } from './NewLogo';
export function Header() {
return (
<header className="bg-white dark:bg-slate-950 p-4">
<NewLogo />
<ThemeToggle />
Keep your version, discard theirs.
git checkout --ours <file>
git add <file>
Keep their version, discard yours.
git checkout --theirs <file>
git add <file>
Edit file to combine both changes (most common).
# Edit file to resolve
vim <file>
git add <file>
git mergetool <file>
| Pattern | Typical Resolution |
|---|---|
| Same line, different changes | Manual merge combining intent |
| Deleted vs modified | Decide if deletion or modification wins |
| Added file in both | Merge contents or pick one |
| Renamed differently | Pick the better name, merge content |
| Structural refactor | Usually accept refactor, reapply changes |
# Mark as resolved
git add <resolved-file>
# Continue the operation
git merge --continue # for merge
git rebase --continue # for rebase
git cherry-pick --continue # for cherry-pick
/git-abort if conflicts are too complex/git-merge-main or /git-rebase to start merge/rebase/git-push to update remote