Skip to content
Snippets Groups Projects
Commit be54fca7 authored by flmistral's avatar flmistral
Browse files

Q2.2

parent 7272820d
No related branches found
No related tags found
No related merge requests found
......@@ -73,15 +73,88 @@ Date: Mon Jan 8 18:18:35 2018 +0100
0. Il ne devrait y avoir que deux entrées dans l'historique pourquoi ? `*`
> Il n'y a que deux entrées car en amendant le commit précédent nous l'avons modifié. Il devient le commit que l'on vient de faire.
0. Créer un nouveau fichier, nommé start, contenant la date et l'heure actuelle `*`
```
$ git add start.txt
$ git commit -m"Q1.10"
[master ec5ce82] Q1.10
1 file changed, 1 insertion(+)
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
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: TP1.md.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
file2ignore.txt
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 `*`
```
$ git commit -am"Q1.13" --amend
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory.
[master 7272820] Q1.13
Date: Mon Jan 8 19:11:11 2018 +0100
2 files changed, 1 insertion(+), 93 deletions(-)
create mode 100644 .gitignore
delete mode 100644 TP1.md.txt
```
0. Lister le contenu du repertoire courant, afficher le status et la log
```
$ ls
file2ignore.txt Mistral_Falletty_TP1.md.txt start.txt
```
```
$ git status
On branch master
nothing to commit, working tree clean
```
```
commit 7272820d9e64e48db4f682033b9188330ee6a55e (HEAD -> master)
Author: flmistral <flmistral@poste.isima.fr>
Date: Mon Jan 8 19:11:11 2018 +0100
Q1.13
commit ec5ce8278338e6ac37230d75bf71d7acd652d68c
Author: flmistral <flmistral@poste.isima.fr>
Date: Mon Jan 8 18:54:36 2018 +0100
Q1.10
commit 20f8c60a5f142bad3df24f8a4a5319841565fae3
Author: flmistral <flmistral@poste.isima.fr>
Date: Mon Jan 8 18:52:05 2018 +0100
Q1.9
commit 125e9e008ebf64fd4c4d9db4442851e045be701e
Author: flmistral <flmistral@poste.isima.fr>
Date: Mon Jan 8 18:32:07 2018 +0100
Q1.7
commit cb1f8fa6a6cce12bf0b2fd8450a82189284f0e1e
Author: flmistral <flmistral@poste.isima.fr>
Date: Mon Jan 8 18:18:35 2018 +0100
Q1.3
```
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 Falletty_Mistral
```
```
$ git checkout Falletty_Mistral
Switched to branch 'Falletty_Mistral'
M Mistral_Falletty_TP1.md.txt
```
0. Lister les branches locales et les fichiers présent dans le répertoire courant `*`
```
git branch
*Falletty_Mistral
master
```
0. Aficher le status de votre repo `*`
0. Créez une branche pour _développer_ la réponse de ce point (nommez là `mybranch-2.4` par exemple)
0. Afficher un historique sous forme de graph (`a dog`) de votre repo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment