From 20da6db2ffcc39063f660b859bdd343b4dd0f27e Mon Sep 17 00:00:00 2001 From: BEUVOT Richard <richard.beuvot@poste.isima.fr> Date: Mon, 8 Jan 2018 19:13:50 +0100 Subject: [PATCH] Q1.15 Modification du CR --- Beuvot-Maleterre-Compte-Rendu.md | 136 +++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/Beuvot-Maleterre-Compte-Rendu.md b/Beuvot-Maleterre-Compte-Rendu.md index d899d0b..14ad704 100644 --- a/Beuvot-Maleterre-Compte-Rendu.md +++ b/Beuvot-Maleterre-Compte-Rendu.md @@ -29,6 +29,9 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge > git status > ##### Commentaire > Affiche s'il y a des modifications à commit (ici non) +> ##### Résultat +> On branch master +> nothing to commit, working tree clean 0. Modifiez le CR pour supprimer la première partie et indiquez vos noms (n'oublier pas de faire un `git add` pour marque le fichier comme devant être ajouté) `*` > git add Compte-Rendu.md @@ -40,16 +43,149 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge > git log > ##### Commentaire > Affiche les deux commits précédents avec Date, Auteur et message du commit +> ##### Résultat +> commit fdc4b645a6914215dceb6d53635f33fa9220f356 (HEAD -> master) +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:28:54 2018 +0100 +> Q1.5 Modification du compte rendu +> +> commit 45ed30618fb51b855e4a1f2fd1f2d0fef4a562f2 +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:24:09 2018 +0100 +> +> Q1.3 Ajout du compte rendu 0. Renommer ce fichier en préfixant avec vos noms en amendant le commit précédent (`git commit -m "mon message"` pour indiquer le mesage de commit directement) `*` +> git add Beuvot-Maleterre-Compte-Rendu.md +> git add Compte-Rendu.md +> git commit -m "Q1.7 Modification du CR et de son nom" --amend +> ##### Commentaire +> Ajout du nouveau fichier et de la suppression de l'ancien +> Changement du commit précédent + 0. Afficher l'historique de votre repo +> git log +> ##### Commentaire +> Affiche les deux commits précédents avec Date, Auteur et message du commit. +> ##### Résultat +> commit 1b97861b09c1ccad3b594fa8270971676f1baab0 (HEAD -> master) +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:28:54 2018 +0100 +> +> Q1.7 Modification du CR et de son nom +> +> commit 45ed30618fb51b855e4a1f2fd1f2d0fef4a562f2 +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:24:09 2018 +0100 +> +> Q1.3 Ajout du compte rendu + 0. Il ne devrait y avoir que deux entrées dans l'historique pourquoi ? `*` +> Le commit Q1.5 à été modifié par le commit Q1.7. + 0. Créer un nouveau fichier, nommé start, contenant la date et l'heure actuelle `*` +> echo `date` > start +> git add start +> git commit -m "Q1.10 Ajout du fichier start avec date actuelle" +> ##### Commentaire +> On utilise la commande bash pour créer le fichier start puis on commit. + 0. Créer un nouveau fichier : file2ignore +> touch file2ignore +> ##### Commentaire +> Création du fichier file2ignore. + 0. Afficher la status de votre copie de travail +> git status +> ##### Commentaire +> Indique que les modifications de CR et que l'ajout du fichier file2ingore ne sont actuellement pas prise en compte en cas de commit. (Il faut faire un git add) +> ##### Résultat +> On branch master +> Changes not staged for commit: +> (use "git add <file>..." to update what will be committed) +> (use "git checkout -- <file>..." to discard changes in working directory) +> +> modified: Beuvot-Maleterre-Compte-Rendu.md +> +> Untracked files: +> (use "git add <file>..." to include in what will be committed) +> +> file2ignore +> +> no changes added to commit (use "git add" and/or "git commit -a") + 0. On souhaite que ce fichier soit ignoré et ne soit jamais commiter. Réalisez la configuration nécesaire pour que cette regle soit effective `*` +> echo "file2ignore" >.gitignore +> git add .gitignore +> git commit -m "Q1.13 Ajout du gitignore pour ignore file2ignore" +> ##### Commentaire +> Ajout du .gitignore afin d'ignorer file2ignore + 0. Lister le contenu du repertoire courant, afficher le status et la log +> ls +> git status +> git log +> ##### Commentaire +> Résultat des commandes. Le fichier de Compte-Rendu apparait à cause des sauvegarde régulière non commit. +> ##### Résultat +> $ ls -a +> ./ ../ .git/ .gitignore Beuvot-Maleterre-Compte-Rendu.md file2ignore start +> +> $ git status +> On branch master +> Changes not staged for commit: +> (use "git add <file>..." to update what will be committed) +> (use "git checkout -- <file>..." to discard changes in working directory) +> +> modified: Beuvot-Maleterre-Compte-Rendu.md +> +> no changes added to commit (use "git add" and/or "git commit -a") +> +> $ git log +> commit c70035e94cd361e19794ef1ed89fb312dfe3ffe6 (HEAD -> master) +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:54:25 2018 +0100 +> +> Q1.13 Ajout du gitignore pour ignore file2ignore +> +> commit d7bd190b11d47444b4b023c3d55beac25e811505 +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:44:37 2018 +0100 +> +> Q1.10 Ajout du fichier start avec date actuelle +> +> commit 1b97861b09c1ccad3b594fa8270971676f1baab0 +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:28:54 2018 +0100 +> +> Q1.7 Modification du CR et de son nom +> +> commit 45ed30618fb51b855e4a1f2fd1f2d0fef4a562f2 +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> Date: Mon Jan 8 18:24:09 2018 +0100 +> +> Q1.3 Ajout du compte rendu + 0. Avant de commiter affichez les modifications par rapport à la précédente révision ? `*` +> git diff +> git add Beuvot-Maleterre-Compte-Rendu.md +> ##### Commentaire +> Affiche les différences entre la version actuelle et le dernier commit +> ##### Résultat +> diff --git a/Beuvot-Maleterre-Compte-Rendu.md b/Beuvot-Maleterre-Compte-Rendu.md +> index d899d0b..b523557 100644 +> --- a/Beuvot-Maleterre-Compte-Rendu.md +> +++ b/Beuvot-Maleterre-Compte-Rendu.md +> @@ -29,6 +29,9 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge +> +> +> $ git log +> +> commit c70035e94cd361e19794ef1ed89fb312dfe3ffe6 (HEAD -> master) +> +> Author: BEUVOT Richard <richard.beuvot@poste.isima.fr> +> +> Date: Mon Jan 8 18:54:25 2018 +0100 +> +> +> +> Q1.13 Ajout du gitignore pour ignore file2ignore +> + +> 0. Avant de commiter affichez les modifications par rapport à la précédente révision ? `*` ##### 2. Les branches 0. Créez une branche portant votre nom et basculer sur cette branche (dans la suite du TP cette branche est désignée par `mybranch`) -- GitLab