-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.tex
More file actions
392 lines (344 loc) · 9.77 KB
/
Copy pathgit.tex
File metadata and controls
392 lines (344 loc) · 9.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
%\usepackage{pslatex}
%\usepackage{colortbl}
%\usepackage{calc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\addto\captionsfrench{\def\figurename{Source }}
%source ihttp://fr.wikibooks.org/wiki/LaTeX/%C3%89l%C3%A9ments_flottants_et_figures
\lstset{language=bash,basicstyle=\ttfamily}
\usetheme{Warsaw}
\newcommand{\git}{\texttt{git}\xspace}
\definecolor{fondtitre}{rgb}{0.20,0.43,0.09} % vert fonce
\definecolor{coultitre}{rgb}{0.40,0.04,0.05} % marron
\definecolor{fondtexte}{rgb}{1,1,1} % fond blanc
\definecolor{autre1}{RGB}{250,150,5} % vieux mauve
\definecolor{autre2}{RGB}{235,175,235} % horrible r
\colorlet{coultexte}{black}
\setbeamercolor{structure}{fg=coultitre, bg=fondtitre!40}
\setbeamercolor{block body}{bg=fondtexte}
\setbeamercolor{normal text}{fg=coultexte,bg=fondtexte}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{
\hbox{
\hspace*{-0.06cm}
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}
\usebeamerfont{date in head/foot}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}
\usebeamerfont{date in head/foot}\insertdate
\end{beamercolorbox}}
\vskip0pt
}
\title[ROSE]{Gestion de versions : \git}
\author{Bertrand, Clément, Laurent, Vaibhav.}
\institute{Télécom ParisTech}
\date{4 mars 2011}
%---------------------------------------
\begin{document}
\begin{frame}
\titlepage
\end{frame}
%------------------ Plan ---------------
\section*{Plan}
\frame{\frametitle{Plan} \small \tableofcontents}
%------------------ Slides ------------
\section{Introduction}
\subsection*{Logiciels de gestion de versions}
\begin{frame}{Logiciels de gestion de versions}
\begin{description}
\item[Principe :] commits, branches, différences, identification\dots
\item[Avantages :] travail collaboratif, sauvegarde, évolution\dots
\item[Architecture :] locale, centralisée, distribuée
\end{description}
\end{frame}
\section{Installer et configurer \git}
\subsection*{Installation}
\begin{frame}{Installation}
\begin{itemize}
\item paquets \texttt{git} sur debian/ubuntu
\item éventuellement qgit/gitk, meld/emerge/vimdiff...
\item configuration
\end{itemize}
\end{frame}
\subsection*{Configuration}
\begin{frame}[containsverbatim]{Configuration}
\begin{itemize}
\item fichier de configuration \lstinline|~/.gitconfig| ou en ligne de commande \lstinline|git config --global|
\item user.name
\item user.email
\item core.editor
\item merge.tool
\end{itemize}
\end{frame}
\section{Les bases de \git}
\subsection*{Statut de fichiers}
\begin{frame}{Statut de fichiers}
\begin{figure}
\begin{center}
\includegraphics[scale=0.7]{img/Status_lifecycle.png}
\end{center}
\caption{progit.org}
\end{figure}
\end{frame}
\subsection*{Commandes de Base}
\begin{frame}[containsverbatim]{Commandes de base}
\begin{itemize}
\item \lstinline|git clone| \\
\lstinline|elecinf381@hg.comelec.enst.fr:2011/repo.git| \\
- cloner un dépot distant
\item \lstinline|git add| - ajouter un fichier ou des changements
\item \lstinline|git rm| - supprimer un fichier ou des changements
\item \lstinline|git status| - afficher l'état courant des fichiers
\item \lstinline|git commit| - créer un commit avec les modifications ajoutées
\item \lstinline|git log| - afficher l'historique
\end{itemize}
\end{frame}
\section{Gestion de branches}
\subsection*{Gestion locale}
\begin{frame}{Branches, pointeurs et commits}
\begin{figure}
\begin{center}
\includegraphics[scale=0.8]{img/Branch1.png}
\end{center}
\caption{progit.org}
\end{figure}
\end{frame}
\begin{frame}[containsverbatim]{Commandes : branches}
\begin{itemize}
\item \lstinline|git branch| - lister les branches
\item \lstinline|git branch <name>| - créer une branche
\item \lstinline|git branch -d <name>| - supprimer une branche
\item \lstinline|git checkout <branch/commit>| - se placer sur branche ou un commit
\end{itemize}
\end{frame}
\subsection*{Interactions avec un dépot distant}
\begin{frame}{Interactions avec un dépot distant}
\begin{itemize}
\item \lstinline|git fetch| - se synchroniser avec le serveur
\textbf{sans changer l'état courant}
\item \lstinline|git push <remote> <branch>:<remotebranch>| - mettre
à jour une branche \textbf{distante}
\item \lstinline|git push <remote> :<remotebranch>| - supprimer une
branche \textbf{distante}
\end{itemize}
\end{frame}
\subsection*{Merge}
\begin{frame}{Merge 1/2}
\begin{figure}
\begin{center}
\includegraphics[scale=1]{img/Merge.png}
\end{center}
\caption{progit.org}
\end{figure}
\end{frame}
\begin{frame}{Merge 2/2}
\begin{itemize}
\item \lstinline|git checkout <branch1>|
\item \lstinline|git merge <branch2>|
\item si \emph{merge conflict} :
\begin{itemize}
\item[] \lstinline|git status|
\item[] \lstinline|git mergetool|
\item[] \lstinline|git commit|
\end{itemize}
\item \lstinline|git pull| - fetch puis merge
\end{itemize}
\end{frame}
\section{Exemple}
\begin{frame}{Exemple}
\begin{columns}
\begin{column}{0.5\textwidth}
\huge Dépot distant :
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[width=0.70\textwidth]{img/1.pdf}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/2.pdf}
\begin{itemize}
\small
\item \lstinline|git clone user@host:repo.git| \vspace{0.52cm} \\
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/3.pdf}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git checkout master|
\item \lstinline|git branch b2|
\end{itemize}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git checkout b2|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/3-bis.pdf}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\small
\item faire changements
\item \lstinline|git add <files>|
\end{itemize}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git commit|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/3-ter.pdf}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\small
\item faire changements
\item \lstinline|git add <files>|
\end{itemize}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git commit|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/3-quad.pdf}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\small
\item faire changements
\item \lstinline|git add <files>|
\end{itemize}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git commit|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/4.pdf}
\begin{itemize}
\small
\item \lstinline|git push origin b2| \vspace{0.46cm} \\
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/5.pdf}
\begin{itemize}
\small
\item \lstinline|git rebase master b1| \vspace{0.46cm} \\
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/6.pdf}
\begin{itemize}
\small
\item \lstinline|git push -f origin b1| \vspace{0.46cm} \\
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/7.pdf}
\begin{itemize}
\small
\item \lstinline|git push origin b1:master| \vspace{0.46cm} \\
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/8.pdf}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git pull origin master|
\item \lstinline|git branch -D b1|
\end{itemize}
\column{0.5\textwidth}
\begin{itemize}
\small
\item \lstinline|git push origin :b1|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/9.pdf}
\begin{itemize}
\small
\item \lstinline|git rebase master b2|
\item \lstinline|git push -f origin b2|
\end{itemize}
\end{frame}
\begin{frame}{}
\centering
\includegraphics[width=0.85\textwidth]{img/10.pdf}
\begin{columns}
\column{0.53\textwidth}
\begin{itemize}
\small
\item \lstinline|git push origin b2:master|
\item \lstinline|git branch -D b2|
\end{itemize}
\column{0.47\textwidth}
\begin{itemize}
\small
\item \lstinline|git push origin :b2|
\item \lstinline|git pull origin master|
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}{}
\begin{center}
\Huge \dots
\end{center}
\end{frame}
\section{Conclusion}
\begin{frame}{Conclusion}
\begin{itemize}
\item Flexible
\item Organisation
\item Retours en arrière
\item Sauvegarde sur serveur
\item Obligatoire
\end{itemize}
\end{frame}
\section{Ressources}
\begin{frame}{Ressources}
\begin{itemize}
\item \href{http://progit.org/about.html}{Progit}
\item \href{http://git.or.cz/gitwiki/GitHosting}{Liste de serveurs \git}
\end{itemize}
\end{frame}
\end{document}