Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Picasoft
Formations
Git niveau 1
Commits
89b14c95
Verified
Commit
89b14c95
authored
Sep 30, 2018
by
Thibaud Duhautbout
Browse files
Finalisation des pauses / ajout log manquant
parent
e0f03c75
Pipeline
#27931
passed with stage
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
presentation.tex
View file @
89b14c95
...
@@ -151,6 +151,8 @@ $ cd formation_git
...
@@ -151,6 +151,8 @@ $ cd formation_git
\end{Verbatim}
\end{Verbatim}
\end{beamercolorbox}
\end{beamercolorbox}
\Pause
Configuration de l'identité de l'utilisateur :
Configuration de l'identité de l'utilisateur :
\begin{itemize}
\begin{itemize}
\item
Permet d'identifier l'auteur des mises à jour
\\
\item
Permet d'identifier l'auteur des mises à jour
\\
...
@@ -166,6 +168,8 @@ $ git config --global/local user.email "<adresse email>"
...
@@ -166,6 +168,8 @@ $ git config --global/local user.email "<adresse email>"
\end{Verbatim}
\end{Verbatim}
\end{beamercolorbox}
\end{beamercolorbox}
\Pause
Initialisation du repo git :
Initialisation du repo git :
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\vspace
{
-
\seplength
}
\vspace
{
-
\seplength
}
...
@@ -213,16 +217,15 @@ rien à valider (créez/copiez des fichiers et utilisez "git add" pour les suivr
...
@@ -213,16 +217,15 @@ rien à valider (créez/copiez des fichiers et utilisez "git add" pour les suivr
\end
{
Verbatim
}
\end
{
Verbatim
}
\end
{
beamercolorbox
}
\end
{
beamercolorbox
}
\Pause
On va créer un fichier
!
On va créer un fichier
!
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\vspace
{
-
\seplength
}
\vspace
{
-
\seplength
}
\begin
{
Verbatim
}
\begin
{
Verbatim
}
$
echo "J'apprends à utiliser git" > formation.txt
$
echo "J'apprends à utiliser git" > formation.txt
\end{Verbatim}
\Pause
\Pause
\vspace
{
-
\seplength
}
\begin{Verbatim}
$
git status
$
git status
Sur la branche master
Sur la branche master
...
@@ -423,10 +426,10 @@ Date: Mon Sep 24 09:54:14 2018 +0200
...
@@ -423,10 +426,10 @@ Date: Mon Sep 24 09:54:14 2018 +0200
\begin{frame}
[fragile]
\begin{frame}
[fragile]
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\vspace
{
-
\seplength
}
\vspace
{
-
\seplength
}
\begin{Verbatim}
\begin{Verbatim}
$
echo "J'ajoute une ligne à mon fichier" >> formation.txt
\Pause
$
echo "J'ajoute une ligne à mon fichier" >> formation.txt
$
git diff
$
\Pause
git diff
{
\bf
diff --git a/formation.txt b/formation.txt
{
\bf
diff --git a/formation.txt b/formation.txt
index 951923e..bbbb145 100644
index 951923e..bbbb145 100644
...
@@ -434,13 +437,13 @@ index 951923e..bbbb145 100644
...
@@ -434,13 +437,13 @@ index 951923e..bbbb145 100644
+++ b/formation.txt
}
+++ b/formation.txt
}
\textcolor
{
cyan
}{
@@ -1 +1,2 @@
}
\textcolor
{
cyan
}{
@@ -1 +1,2 @@
}
J'apprends à utiliser git
J'apprends à utiliser git
\textcolor
{
myGreen
}{
+J'ajoute une ligne à mon fichier
}
\Pause
\textcolor
{
myGreen
}{
+J'ajoute une ligne à mon fichier
}
$
git add formation.txt
\Pause
$
\Pause
git add formation.txt
$
git diff
\Pause
$
\Pause
git diff
$
git diff HEAD
$
\Pause
git diff HEAD
{
\bf
diff
--
git a
/
formation.txt b
/
formation.txt
{
\bf
diff
--
git a
/
formation.txt b
/
formation.txt
index
951923
e..bbbb
145
100644
index
951923
e..bbbb
145
100644
...
@@ -448,9 +451,9 @@ index 951923e..bbbb145 100644
...
@@ -448,9 +451,9 @@ index 951923e..bbbb145 100644
+++
b
/
formation.txt
}
+++
b
/
formation.txt
}
\textcolor
{
cyan
}{
@@
-
1
+
1
,
2
@@
}
\textcolor
{
cyan
}{
@@
-
1
+
1
,
2
@@
}
J'apprends à utiliser git
J'apprends à utiliser git
\textcolor
{
myGreen
}{
+
J'ajoute une ligne à mon fichier
}
\Pause
\textcolor
{
myGreen
}{
+
J'ajoute une ligne à mon fichier
}
$
git commit -m "Second commit"
$
\Pause
git commit -m "Second commit"
[master e788cc0] Second commit
[master e788cc0] Second commit
1 file changed, 1 insertion(+)
1 file changed, 1 insertion(+)
...
@@ -475,9 +478,9 @@ Date: Mon Sep 24 11:39:21 2018 +0200
...
@@ -475,9 +478,9 @@ Date: Mon Sep 24 11:39:21 2018 +0200
Author: huetremy <remy.huet@etu.utc.fr>
Author: huetremy <remy.huet@etu.utc.fr>
Date: Mon Sep
24
09
:
54
:
14
2018
+
0200
Date: Mon Sep
24
09
:
54
:
14
2018
+
0200
Ajout du premier fichier
\Pause
Ajout du premier fichier
$
git diff 2487d e788c
$
\Pause
git diff 2487d e788c
{
\bf
diff --git a/formation.txt b/formation.txt
{
\bf
diff --git a/formation.txt b/formation.txt
index 951923e..bbbb145 100644
index 951923e..bbbb145 100644
...
@@ -516,6 +519,8 @@ $ echo "travail en cours..." >> formation.txt
...
@@ -516,6 +519,8 @@ $ echo "travail en cours..." >> formation.txt
\verb
+
$
git stash+ : enregistre les modifications locales et restaure le working directory à l'état du dernier commit.
\verb
+
$
git stash+ : enregistre les modifications locales et restaure le working directory à l'état du dernier commit.
\Pause
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\vspace
{
-
\seplength
}
\vspace
{
-
\seplength
}
\begin{Verbatim}
\begin{Verbatim}
...
@@ -524,11 +529,11 @@ Sur la branche master
...
@@ -524,11 +529,11 @@ Sur la branche master
Modifications qui ne seront pas validées :
Modifications qui ne seront pas validées :
\textcolor
{
red
}{
modifié : formation.tex
}
\textcolor
{
red
}{
modifié : formation.tex
}
\Pause
$
git stash
$
\Pause
git stash
Copie de travail et état de l'index sauvegardés dans WIP on master: 9a7302c Second commit
Copie de travail et état de l'index sauvegardés dans WIP on master: 9a7302c Second commit
\Pause
$
git status
$
\Pause
git status
Sur la branche master
Sur la branche master
rien à valider, la copie de travail est propre
rien à valider, la copie de travail est propre
\end
{
Verbatim
}
\end
{
Verbatim
}
...
@@ -578,6 +583,8 @@ $ git commit -m "travail en cours"
...
@@ -578,6 +583,8 @@ $ git commit -m "travail en cours"
\enquote
{
Dis, t'aurais encore la version du projet qu'on a envoyé au prof la semaine dernière ?
}
\enquote
{
Dis, t'aurais encore la version du projet qu'on a envoyé au prof la semaine dernière ?
}
\end
{
block
}
\end
{
block
}
\Pause
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\vspace
{
-
\seplength
}
\vspace
{
-
\seplength
}
\begin
{
Verbatim
}
\begin
{
Verbatim
}
...
@@ -618,16 +625,27 @@ Vous êtes dans l'état « HEAD détachée ». Vous pouvez visiter, faire des
...
@@ -618,16 +625,27 @@ Vous êtes dans l'état « HEAD détachée ». Vous pouvez visiter, faire des
expérimentales et les valider. Il vous suffit de faire une autre extraction pour
expérimentales et les valider. Il vous suffit de faire une autre extraction pour
abandonner les commits que vous faites dans cet état sans impacter les autres branches
abandonner les commits que vous faites dans cet état sans impacter les autres branches
Si vous voulez créer une nouvelle branche pour conserver les commits que vous créez,
[
...
]
il vous suffit d'utiliser « checkout
-
b »
(
maintenant ou plus tard
)
comme ceci :
git checkout
-
b <nom
-
de
-
la
-
nouvelle
-
branche>
HEAD est maintenant sur
9
a
7302
c Second commit
HEAD est maintenant sur
9
a
7302
c Second commit
\Pause
$
git status
$
\Pause
git status
\textcolor
{
red
}{
HEAD détachée
}
sur 9a7302c
\textcolor
{
red
}{
HEAD détachée
}
sur 9a7302c
rien à valider, la copie de travail est propre
rien à valider, la copie de travail est propre
$
\Pause
git log
--
graph
--
all
*
\textcolor
{
yellow
}{
commit
2624
c
90
dbc
8
f
28
be
29
f
7
cbd
8
ea
497
eaef
8832
f
44
}
(
\textcolor
{
green
}{
master
}
)
\textcolor
{
red
}{
|
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
\textcolor
{
red
}{
|
}
Date: Sun Sep
30
20
:
38
:
59
2018
+
0200
\textcolor
{
red
}{
|
}
travail en cours
*
\textcolor
{
yellow
}{
commit
9
a
7302
c
06628
ef
69
a
5
e
1
c
9
cebc
2
a
1
c
2904
e
7
d
41
f
}
(
\textcolor
{
cyan
}{
HEAD
}
)
\textcolor
{
red
}{
|
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
\textcolor
{
red
}{
|
}
Date: Sun Sep
30
20
:
34
:
08
2018
+
0200
\textcolor
{
red
}{
|
}
Second commit
*
\textcolor
{
yellow
}{
commit
6
b
6799
b
3209
de
6
cb
00
c
69
b
2
afb
490
abb
0
f
5481
e
9
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
Date: Sat Sep
22
22
:
18
:
26
2018
+
0200
Ajout du premier fichier
\end
{
Verbatim
}
\end
{
Verbatim
}
\end
{
beamercolorbox
}
\end
{
beamercolorbox
}
\end
{
frame
}
\end
{
frame
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment