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_git
2
cd init_git
3
git init
4
touch toto.txt
5
git add toto.txt
6
git commit -m "premier commit"
7
git branch alice
8
git branch bob
9
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.txt
3
git commit -am "Add pomme to toto.txt"
4
git checkout alice
5
cat toto.txt