Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
prog:git:commandes [01/10/2022 11:10]
thierry [Savoir dans quelle branche on se trouve]
prog:git:commandes [01/10/2022 11:21] (Version actuelle)
thierry [Basculer sur une autre branche]
Ligne 15: Ligne 15:
 ==== Savoir dans quelle branche on se trouve ==== ==== Savoir dans quelle branche on se trouve ====
 commande ''​git branch''​ affiche commande ''​git branch''​ affiche
-<​code>​+<​code ​bash>
 J:​\webprojects>​git branch J:​\webprojects>​git branch
 * installation-sécurité * installation-sécurité
Ligne 21: Ligne 21:
 </​code>​ </​code>​
 La branche ou l'on se trouve actuellement est précédée d'un ''​*''​ La branche ou l'on se trouve actuellement est précédée d'un ''​*''​
-==== Ajouter une branch ​====+==== Ajouter une branche ​====
 commande ''​git branch %NomDeLaBranche%''​ commande ''​git branch %NomDeLaBranche%''​
-<​code>​+<​code ​bash>
 J:​\webprojects>​git branch test J:​\webprojects>​git branch test
  
Ligne 31: Ligne 31:
   test   test
 </​code>​ </​code>​
 +
 +==== Basculer sur une autre branche ====
 +commande ''​git checkout %NomDeLaBranche%''​
 +<code bash>
 +J:​\webprojects>​git checkout test
 +Switched to branch '​test'​
 +
 +J:​\webprojects>​git branch
 +  installation-sécurité
 +  master
 +* test
 +</​code>​
 +
 +==== Fusionner deux branche ====
 +  * On se positionne sur la branche principale : ''​git checkout master''​
 +  * On merge les branches avec ''​git merge test''​
 +
 +
 +