Exercice : Application
Question
Créez un dossier init_git et créez-y un dépôt git. Mettez-y un fichier toto.txt. Commitez les modifications. Ensuite, créez trois branches et déplacez vous
Indice
1
mkdir init_git2
cd init_git3
git init4
touch toto.txt5
git add toto.txt6
git commit -m "premier commit"
7
git branch alice8
git branch bob9
git checkout -b charlie
Question
Ajoutez une ligne contenant "pomme" dans votre fichier aller sur la branche alice et constater que le changement n'est pas fait sur la nouvelle branche
Solution
1
echo "pomme" >> toto.txt
2
cat toto.txt3
git commit -am "Add pomme to toto.txt"
4
git checkout alice5
cat toto.txt