Basculer vers une branche
Vous venez de créer une branche; vous devez à présent basculer vers cette branche pour y ajouter de nouveaux commits.
Utilisez la commande git checkout pour basculer vers la branche issue1
.
$ git checkout issue1
Switched to branch 'issue1'
L'historique se présente maintenant comme suit:

L'option -b
permet de créer une nouvelle branche et de basculer vers cette branche avec une seule commande.
Ajoutons à présent un commit. Ajoutez le texte en gras ci-dessous au fichier myfile.txt
.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
Validez ensuite la modification.
$ git add myfile.txt
$ git commit -m "append description of the add command"
[issue1 b2b23c4] append description of the add command
1 files changed, 1 insertions(+), 0 deletions(-)
L'historique se présente désormais comme suit:
