diff --git a/Bertoni Walczyszyn tp1 cpw.md b/Bertoni Walczyszyn tp1 cpw.md index dc9e5e331046bc4bca18242e1985bff9a41896dc..38797e9457eb664d410cf37267b8f42e2161dc60 100644 --- a/Bertoni Walczyszyn tp1 cpw.md +++ b/Bertoni Walczyszyn tp1 cpw.md @@ -79,27 +79,43 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge de nom du fichier. 0. Créer un nouveau fichier, nommé start, contenant la date et l'heure actuelle `*` + $ git add * + + $ git commit -m "ajout fichier start" + [master 39cc64e] ajout fichier start + 2 files changed, 55 insertions(+), 2 deletions(-) + create mode 100644 start.txt + 0. Créer un nouveau fichier : file2ignore 0. Afficher la status de votre copie de travail + + $ git status + On branch master + Untracked files: + (use "git add <file>..." to include in what will be committed) + + file2ignore.txt + + nothing added to commit but untracked files present (use "git add" to track) + 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 `*` - $ cat .gitignore - file2ignore.txt + $ touch .gitignore + $ echo .gitignore > file2ignore.txt + $ git add .gitignore + warning: LF will be replaced by CRLF in .gitignore. + The file will have its original line endings in your working directory. + $ git commit -m "ajout .gitignore" + [master b710486] ajout .gitignore + 1 file changed, 1 insertion(+) + create mode 100644 .gitignore 0. Lister le contenu du repertoire courant, afficher le status et la log - $ ls -la - total 3072 - drwxr-xr-x 1 mabertoni1 1049089 0 janv. 8 19:29 ./ - drwxr-xr-x 1 mabertoni1 1049089 0 janv. 23 08:41 ../ - drwxr-xr-x 1 mabertoni1 1049089 0 janv. 29 18:46 .git/ - -rw-r--r-- 1 mabertoni1 1049089 16 janv. 8 18:51 .gitignore - -rw-r--r-- 1 mabertoni1 1049089 6199 janv. 29 18:43 'Bertoni Walczyszyn tp1 cpw.md' - -rw-r--r-- 1 mabertoni1 1049089 0 janv. 8 18:41 file2ignore.txt - -rw-r--r-- 1 mabertoni1 1049089 39 janv. 8 18:40 start.txt - -status: + + $ ls -a + ./ ../ .git/ .gitignore 'Bertoni Walczyszyn tp1 cpw.md' file2ignore.txt start.txt $ git status - On branch BertoniWalczyszyn + 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) @@ -107,16 +123,9 @@ status: modified: Bertoni Walczyszyn tp1 cpw.md no changes added to commit (use "git add" and/or "git commit -a") - log: $ git log - commit 113376eeadaa267b944db844395884145bc3a908 (HEAD -> BertoniWalczyszyn, origin/BertoniWalczyszyn) - Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 19:35:59 2018 +0100 - - derniere version 08/01 - - commit 8d099642e935da8dfb10e45c15dfdeb6baf21718 + commit 8d099642e935da8dfb10e45c15dfdeb6baf21718 (HEAD -> master) Author: bertoni <marion_bertoni@outlook.fr> Date: Mon Jan 8 18:53:56 2018 +0100 @@ -132,53 +141,116 @@ status: Author: bertoni <marion_bertoni@outlook.fr> Date: Mon Jan 8 18:30:28 2018 +0100 - :...skipping... - commit 113376eeadaa267b944db844395884145bc3a908 (HEAD -> BertoniWalczyszyn, origin/BertoniWalczyszyn) + modification du nom + commit a95c3e051181aa16b2a2e8bd95fb7c2c65a690d3 Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 19:35:59 2018 +0100 + Date: Mon Jan 8 18:21:02 2018 +0100 - derniere version 08/01 + premier ajout - commit 8d099642e935da8dfb10e45c15dfdeb6baf21718 - Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 18:53:56 2018 +0100 +0. Avant de commiter affichez les modifications par rapport à la précédente révision ? `*` + $ git diff HEAD 39cc64 + diff --git a/Bertoni Walczyszyn tp1 cpw.md b/Bertoni Walczyszyn tp1 cpw.md + index 24d2b78..d503c57 100644 + --- a/Bertoni Walczyszyn tp1 cpw.md + +++ b/Bertoni Walczyszyn tp1 cpw.md + @@ -52,12 +52,11 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge - ajout .gitignore + renamed: tp1 cpw.md -> Bertoni Walczyszyn tp1 cpw.md - commit 39cc64eb63efc636e37df435d7f4fb1c1b8a769b - Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 18:43:46 2018 +0100 + - + - $ git commit -a --amend -m"modification du nom" + - [master 4773e48] modification du nom + - Date: Mon Jan 8 18:30:28 2018 +0100 + - 1 file changed, 8 insertions(+), 87 deletions(-) + - rename tp1 cpw.md => Bertoni Walczyszyn tp1 cpw.md (61%) + + $ git commit -a --amend -m"modification du nom" + + [master 4773e48] modification du nom + + Date: Mon Jan 8 18:30:28 2018 +0100 + + 1 file changed, 8 insertions(+), 87 deletions(-) + + rename tp1 cpw.md => Bertoni Walczyszyn tp1 cpw.md (61%) - ajout fichier start + 0. Afficher l'historique de votre repo - commit 4773e48d22ecbca3b1d7e07ae3e6893fb1e7859b - Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 18:30:28 2018 +0100 + @@ -80,12 +79,81 @@ https://gitlab.isima.fr/mazenovi/2017-F2-Forge + de nom du fichier. - modification du nom + diff --git a/.gitignore b/.gitignore + deleted file mode 100644 + index eb0899c..0000000 + --- a/.gitignore + +++ /dev/null + @@ -1 +0,0 @@ + -file2ignore.txt - commit a95c3e051181aa16b2a2e8bd95fb7c2c65a690d3 - Author: bertoni <marion_bertoni@outlook.fr> - Date: Mon Jan 8 18:21:02 2018 +0100 - premier ajout -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`) + + $ git branch BertoniWalczyszyn + 0. Lister les branches locales et les fichiers présent dans le répertoire courant `*` + + $ git branch + BertoniWalczyszyn + * master + + $ ls -a + ./ ../ .git/ .gitignore 'Bertoni Walczyszyn tp1 cpw.md' file2ignore.txt start.txt + 0. Aficher le status de votre repo `*` + $ git status + On branch master + nothing to commit, working tree clean + 0. Créez une branche pour _développer_ la réponse de ce point (nommez là `mybranch-2.4` par exemple) + + $ git branch + BW-2.4 + BertoniWalczyszyn + * master + 0. Afficher un historique sous forme de graph (`a dog`) de votre repo + + $ git log --all --decorate --oneline --graph + * 88533e1 (BertoniWalczyszyn) derniere version + * 113376e (origin/BertoniWalczyszyn) derniere version 08/01 + | * 52f744d (HEAD -> BW-2.4, master) 19h32 + | * ae1b0d7 branche créée + |/ + * 8d09964 ajout .gitignore + * 39cc64e ajout fichier start + * 4773e48 modification du nom + * a95c3e0 premier ajout + 0. Pourquoi les 2 branches pointent elles sur la même révision ?`*` - 0. Afficher à nouvea l'historique pour montrer les modifications suite au précédent commit `*` -0. Revenir la brache `mybranch` -0. Où sont passé vos reponces au point 2.4 ? `*` + Car aucune modification n'a encore été faite, aucun nouveau commit sur la nouvelle branche + + 0. Afficher à nouveau l'historique pour montrer les modifications suite au précédent commit `*` + + $ git log --all --decorate --oneline --graph + * baf3847 (HEAD -> BW-2.4) creation branche BW-2.4 + * 52f744d (master) 19h32 + * ae1b0d7 branche créée + | * 88533e1 (BertoniWalczyszyn) derniere version + | * 113376e (origin/BertoniWalczyszyn) derniere version 08/01 + |/ + * 8d09964 ajout .gitignore + * 39cc64e ajout fichier start + * 4773e48 modification du nom + * a95c3e0 premier ajout + +0. Revenir la branche `mybranch` + + $ git checkout BertoniWalczyszyn + Switched to branch 'BertoniWalczyszyn' + +0. Où sont passées vos reponses au point 2.4 ? `*` 0. Affichez un historique sous forme de graph (`a dog`) de votre repo, Que peux ton en dire ? 0. Revenir sur la branche master 0. Ajoutez et commitez un fichier (touch new_file) @@ -206,8 +278,24 @@ status: ##### 4. Remote 0. Afficher l'historique de votre repo 0. Ajouter le projet "2017-F2-Forge" comme repository distant `*` + $ git remote add origin https://mabertoni1@gitlab.isima.fr/mazenovi/2017-F2-Forge.git + 0. Lister les branches distantes 0. Pousser votre branche de votre repo local sur le repos distant `*` + + $ git push origin BertoniWalczyszyn + Counting objects: 13, done. + Delta compression using up to 4 threads. + Compressing objects: 100% (10/10), done. + Writing objects: 100% (13/13), 4.63 KiB | 592.00 KiB/s, done. + Total 13 (delta 2), reused 0 (delta 0) + remote: + remote: To create a merge request for BertoniWalczyszyn, visit: + remote: https://gitlab.isima.fr/mazenovi/2017-F2-Forge/merge_requests/new?merge_request%5Bsource_branch%5D=BertoniWalczyszyn + remote: + To https://gitlab.isima.fr/mazenovi/2017-F2-Forge.git + * [new branch] BertoniWalczyszyn -> BertoniWalczyszyn + 0. En consultant votre branche sous gitlab, vous devriez constaté que la date de modification du fichier start est plus acienne que celle de votre compte rendu, porquoi alors que le push de toute votre branche est faite en une seule fois ? 0. Supprimer le dossier .git 0. Faire un git status ?