Skip to content
GitLab
Menu
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
3282f4f1
Unverified
Commit
3282f4f1
authored
Sep 24, 2018
by
Rémy Huet
💻
Browse files
Correction git log, git diff
parent
2fb6c7e8
Pipeline
#27634
passed with stage
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
presentation.tex
View file @
3282f4f1
...
...
@@ -390,12 +390,12 @@ $ git commit -m "Ajout du premier fichier"
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\vspace
{
-
\seplength
}
\begin
{
Verbatim
}
$
git log
\textcolor
{
yellow
}{
commit 2487fdd243542146f15a8e6bb00a94a39117ea1b (
}{
\bf
\textcolor
{
cyan
}{
HEAD ->
}
\textcolor
{
green
}{
master
}}
\textcolor
{
yellow
}{
)
}
Author: huetremy <remy.huet@etu.utc.fr>
Date: Mon Sep 24 09:54:14 2018 +0200
$
git log
\textcolor
{
yellow
}{
commit 2487fdd243542146f15a8e6bb00a94a39117ea1b (
}{
\bf
\textcolor
{
cyan
}{
HEAD ->
}
\textcolor
{
green
}{
master
}}
\textcolor
{
yellow
}{
)
}
Author: huetremy <remy.huet@etu.utc.fr>
Date: Mon Sep 24 09:54:14 2018 +0200
Ajout du premier fichier
Ajout du premier fichier
\end{Verbatim}
\end{beamercolorbox}
\Pause
...
...
@@ -408,7 +408,83 @@ $ git commit -m "Ajout du premier fichier"
\end{itemize}
\end{frame}
\begin{frame}
{
git diff
}
\begin{frame}
[fragile]
{
git diff
}
Permet de voir les modifications apportées au repo :
\begin{itemize}
\item
Depuis l'état du staging area :
\verb
+
$ git diff
+
;
\item
Depuis le derier commit :
\verb
+
$ git diff HEAD
+
;
\item
Depuis un commit quelconque :
\verb
+
$ git diff <id_commit>
+
;
\item
Entre deux commits quelconques :
\verb
+
$ git diff <id_commit_départ> <id_commit_arrivée>
+
.
\end{itemize}
\end{frame}
\begin{frame}
[fragile]
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\begin{Verbatim}
$
echo "J'ajoute une ligne à mon fichier" >> formation.txt
\Pause
$
git diff
{
\bf
diff --git a/formation.txt b/formation.txt
index 951923e..bbbb145 100644
--- a/formation.txt
+++ b/formation.txt
}
\textcolor
{
cyan
}{
@@ -1 +1,2 @@
}
J'apprends à utiliser git
\textcolor
{
olive
}{
+J'ajoute une ligne à mon fichier
}
\Pause
$
git add formation.txt
\Pause
$
git diff
\Pause
$
git diff HEAD
{
\bf
diff
--
git a
/
formation.txt b
/
formation.txt
index
951923
e..bbbb
145
100644
---
a
/
formation.txt
+++
b
/
formation.txt
}
\textcolor
{
cyan
}{
@@
-
1
+
1
,
2
@@
}
J'apprends à utiliser git
\textcolor
{
olive
}{
+
J'ajoute une ligne à mon fichier
}
\Pause
$
git commit -m "Second commit"
[master e788cc0] Second commit
1 file changed, 1 insertion(+)
\end{Verbatim}
\end{beamercolorbox}
\end{frame}
\begin{frame}
[fragile]
\begin{beamercolorbox}
[rounded=true,shadow=true]
{
terminal
}
\begin{Verbatim}
$
git log
\textcolor
{
yellow
}{
commit e
788
cc
09
da
2
de
56
b
9
dd
530
a
78
c
2
f
610
b
94
bea
356
(
}{
\bf\textcolor
{
cyan
}{
HEAD
-
>
}
\textcolor
{
green
}{
master
}}
\textcolor
{
yellow
}{
)
}
Author: huetremy <remy.huet@etu.utc.fr>
Date: Mon Sep
24
11
:
39
:
21
2018
+
0200
Second commit
\textcolor
{
yellow
}{
commit
2487
fdd
243542146
f
15
a
8
e
6
bb
00
a
94
a
39117
ea
1
b
}
Author: huetremy <remy.huet@etu.utc.fr>
Date: Mon Sep
24
09
:
54
:
14
2018
+
0200
Ajout du premier fichier
\Pause
$
git diff 2487d e788c
{
\bf
diff --git a/formation.txt b/formation.txt
index 951923e..bbbb145 100644
--- a/formation.txt
+++ b/formation.txt
}
\textcolor
{
cyan
}{
@@ -1 +1,2 @@
}
J'apprends à utiliser git
\textcolor
{
olive
}{
+J'ajoute une ligne à mon fichier
}
\end{Verbatim}
\end{beamercolorbox}
\end{frame}
\section
{
Concepts avancés
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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