From devops
Analyse les conflits git et propose à l'utilisateur une résolution pas à pas avec validation de chaque étape.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops:conflictsonnetThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**IMPORTANT : Exécute ce workflow étape par étape :**
IMPORTANT : Exécute ce workflow étape par étape :
Résoudre les conflits git de manière interactive : $ARGUMENTS
Analyser les conflits git et guider l'utilisateur dans une résolution pas à pas, fichier par fichier, avec validation à chaque étape.
git branch --show-currentgit branch --show-currentgit status --porcelaingit diff --name-only --diff-filter=Ugit log --oneline HEAD...$DESTINATION_BRANCH --max-count=5Vérifier DESTINATION_BRANCH obligatoire :
DESTINATION_BRANCH n'est pas fourni -> ARRÊTER et demander à l'utilisateurVérifier que DESTINATION_BRANCH existe :
git branch --list "$DESTINATION_BRANCH" (locale)git branch -r --list "origin/$DESTINATION_BRANCH" (remote)Vérifier l'état du repository :
git status pour détecter :
.git/rebase-merge/ ou .git/rebase-apply/)Si aucun merge/rebase en cours :
git merge $DESTINATION_BRANCHgit rebase $DESTINATION_BRANCHSi l'opération échoue avec conflits :
Lister tous les fichiers en conflit :
git diff --name-only --diff-filter=U
Pour chaque fichier, collecter :
Pour chaque fichier en conflit :
Étape A : Afficher le contexte
git diff $FICHIER pour voir les marqueurs de conflitÉtape B : Analyser les versions
<<<<<<< HEAD : version actuelle======= : séparateur>>>>>>> $DESTINATION_BRANCH : version à mergerÉtape C : Proposer 3 stratégies
Garder la version actuelle (ours)
git checkout --ours $FICHIERGarder la version entrante (theirs)
git checkout --theirs $FICHIERRésolution manuelle
<<<<<<<, =======, >>>>>>>Étape D : Demander confirmation
git diff --cached $FICHIERÉtape E : Appliquer la résolution
git add $FICHIERAprès avoir résolu tous les fichiers :
git status
Demander confirmation finale :
Si merge :
git commit --no-edit
# ou si l'utilisateur veut personnaliser :
git commit -m "Merge branch '$DESTINATION_BRANCH' into $CURRENT_BRANCH"
Si rebase :
git rebase --continue
Si annulation demandée :
git merge --abort # ou
git rebase --abort
# Situation : on est sur feature/auth, on veut merger main
/devops:conflict main
# Situation : rebase en cours, 3 fichiers en conflit
/devops:conflict develop
# Rapport de Résolution de Conflits
## Configuration
- Branche actuelle : $CURRENT_BRANCH
- Branche destination : $DESTINATION_BRANCH
- Type d'opération : merge/rebase
## Conflits Détectés
- Nombre total de fichiers : X
- Fichiers résolus : Y
- Fichiers restants : Z
## Résolutions Appliquées
### Fichier : src/auth.php
- Stratégie : Résolution manuelle
- Raison : Fusion de deux implémentations valides
### Fichier : config/app.php
- Stratégie : Garder version actuelle (ours)
- Raison : Configuration locale spécifique
## Statut Final
Tous les conflits résolus
Merge/rebase finalisé avec succès
npx claudepluginhub atournayre/claude-personas --plugin devopsResolves Git merge and rebase conflicts efficiently using bulk strategies like `git checkout --theirs/--ours` over manual conflict marker editing. Activates on merge/rebase conflicts.
Resolves in-progress git merge or rebase conflicts by understanding intent, preserving both sides where possible, and running automated checks.
Resolves Git merge, rebase, cherry-pick, and stash pop conflicts by reading markers, choosing strategies, and safely continuing or aborting.