Description : Applique les modifications d’un commit spécifique sur la branche courante.
Syntaxe : git cherry-pick [<options>] <commit>...
| Option | Description | Utilisation principale |
|---|---|---|
git cherry-pick <commit> | Applique les modifications du commit sur la branche courante | Récupérer un commit d’une autre branche |
-n, --no-commit | Applique sans créer de commit automatiquement | Préparer plusieurs cherry-picks |
-x | Ajoute “(cherry picked from commit …)” au message | Traçabilité du cherry-pick |
--continue | Continue après résolution de conflits | Finaliser un cherry-pick conflictuel |
--abort | Annule le cherry-pick en cours | Abandonner un cherry-pick problématique |
-m <parent-number> | Pour cherry-pick un merge, spécifie quel parent utiliser | Cherry-pick d’une fusion |