Qui suis-je ?
Rossi Oddet
cest quoi ?
Pourquoi Git ?
Le changement
cest maintenant !
10
11
12
13
14
Commitez en local !
15
16
17
18
19
Oui TOUT !
20
TP 1 - Installer Git
21
TP 2 - A propos de vous
Objectif : Paramtrage initial
22
23
Prsentez-vous !
git config --global user.name Rossi Oddet
git config --global user.email rossi.oddet@jcertif.fr
24
25
TP 3 - Initialiser un projet
26
27
28
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
#
README.md
#
pom.xml
#
src/
#
target/
target
30
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
#
.gitignore
#
README.md
#
pom.xml
#
src/
31
git add .
Ajout de tous les fichiers ltat staged
=> candidat au prochain commit
32
git status
33
34
git log
commit 9bd8c8a990b56384619413ff8d898a809269b3a2
Author: Rossi Oddet <rossi.oddet@gmail.com>
Date: Wed Aug 22 22:20:35 2012 +0200
Ajout de toutes les ressources du projet
35
Modifier .gitignore
.gitignore
Exclusion des fichiers
pouvant tre gnrs par
Eclipse
target
.project
.settings
.classpath
36
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: .gitignore
#
no changes added to commit (use "git add" and/or "git commit -a")
37
git log
commit 22180e6fe8effc72e05e173c313037be76dafdae
Author: Rossi Oddet <rossi.oddet@gmail.com>
Date: Wed Aug 22 22:28:27 2012 +0200
Exclusion des fichiers Eclipse
commit 9bd8c8a990b56384619413ff8d898a809269b3a2
Author: Rossi Oddet <rossi.oddet@gmail.com>
Date: Wed Aug 22 22:20:35 2012 +0200
Ajout de toutes les ressources du projet
39
git status
# On branch master
nothing to commit (working directory clean)
40
merci @rblancho
41
42
43
target
.project
.settings
.classpath
src
44
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: .gitignore
#
no changes added to commit (use "git add" and/or "git commit -a")
45
target
.project
.settings
.classpath
46
git status
# On branch master
nothing to commit (working directory clean)
47
48
target
.project
.settings
.classpath
src
49
50
git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#
modified: .gitignore
#
51
52
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: .gitignore
#
no changes added to commit (use "git add" and/or "git commit -a")
53
54
target
.project
.settings
.classpath
src
55
56
57
58
git status
59
60
61
.gitignore | 3 +++
1 file changed, 3 insertions(+)
commit 9bd8c8a990b56384619413ff8d898a809269b3a2
Author: Rossi Oddet <rossi.oddet@gmail.com>
Date: Wed Aug 22 22:20:35 2012 +0200
Ajout de toutes les ressources du projet
.gitignore
| 1+
....
62
63
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: .gitignore
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
#
help.txt
no changes added to commit (use "git add" and/or "git commit -a")
64
65
.gitignore | 3 +++
help.txt | 1 +
2 files changed, 4 insertions(+)
commit 9bd8c8a990b56384619413ff8d898a809269b3a2
Author: Rossi Oddet <rossi.oddet@gmail.com>
Date: Wed Aug 22 22:20:35 2012 +0200
Ajout de toutes les ressources du projet
.gitignore
66
| 1+
67
68
git branch
La liste des branches existantes
develop
* master
69
70
71
72
73
git branch
* develop
master
74
75
76
77
78
texte develop
79
80
texte master
81
82
83
Oops !
84
git status
# On branch master
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
#
both modified:
texte1.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
85
86
87
git mergetool
merge tool candidates: tortoisemerge emerge vimdiff
Merging:
texte1.txt
Normal merge conflict for 'texte1.txt':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (vimdiff):
88
Avec vimdiff
89
90
91
92
93
94
jcertif-webapp 2012
==============
Web Application :
http://www.jcertif.com
95
96
97
git remote -v
origin git://github.com/JCERTIFLab/jcertif-webapp.git (fetch)
origin git://github.com/JCERTIFLab/jcertif-webapp.git (push)
98
99
git remote
origin
roddet
100
101
Branche
git pull
102
103
Merci !
104