Ceci est une ancienne révision du document !
Commandes GIT
Commandes
- git add %NomDuFichier% (ou *)
- git commit (-m “%Message%”)
- git log : affiche les modifications
- git checkout %CommitId% (%CommitId% est visible dans git log)
- git checkout master (-f) reviens au dernier commit
- git checkout %NomBranche% : basculement sur la branche %NomBranche%
- git branch : affiche les branches
- git branch %NomBranche% : crée une nouvelle branche
- git switch %BranchName% : basculement sur la branche %BrancheName%
- git merge %BrancheName% : fusion de la branche active avec la branche %BrancheName%
Utilisation courante
Savoir dans quelle branche on se trouve
commande git branch
affiche
J:\webprojects>git branch * installation-sécurité master
La branche ou l'on se trouve actuellement est précédée d'un *
Ajouter une branch
commande git branch %NomDeLaBranche%
# Ajout de la branche J:\webprojects>git branch test #Visualisation des branches J:\webprojects>git branch * installation-sécurité master test
Sources & Ressources
Vous pourriez laisser un commentaire si vous étiez connecté.