1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 03:22:08 +02:00
tldr/pages.fr/common/git-cherry-pick.md
2023-06-25 14:36:35 +02:00

775 B

git cherry-pick

Appliquer les modifications introduites par les commits existants à la branche actuelle. Pour appliquer les changements a une autre branche, utiliser d'abord git checkout pour basculer sur la branche désirée. Plus d'informations : https://git-scm.com/docs/git-cherry-pick.

  • Applique un commit à la branche courante :

git cherry-pick {{commit}}

  • Appliquer une plage de commits à la branche courante (voir aussi git rebase --onto) :

git cherry-pick {{start_commit}}~..{{end_commit}}

  • Appliquer plusieurs commits non séquentiels à la branche courante :

git cherry-pick {{commit_1}} {{commit_2}}

  • Appliquer les changements d'un commit à la branche courante sans créer de commit :

git cherry-pick --no-commit {{commit}}