Outils pour utilisateurs

Outils du site


gestion_configuration:git:commits

Ceci est une ancienne révision du document !


Gestion des commits

Commiter les changements

Avec message:

$ git commit -m "Correction de bogue."

En ajoutant les changements :

$ git commit -a -m "Correction de bogue."

Changer le message d'un commit

Le commit ne doit pas avoir été poussé.

$ git commit --amend -m "Nouveau message"

Voir les commentaires à ce sujet sur SO

Cherry-Pick de commits

Pour appliquer un commit d'une autre branche à la branche courante:

$ git cherry-pick <commit-hash>

Liste des commits sur une autre branche avec le hash:

$ git log branche-courante..autre-branche --pretty=oneline
$ git log branche-courante..autre-branche --pretty="%h - %an, %ar : %s"
gestion_configuration/git/commits.1486131671.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)