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
APIs
Init
Git
Commits
27685690
Unverified
Commit
27685690
authored
Jan 11, 2019
by
Rémy Huet
💻
Browse files
git reset --soft / --hard
parent
0d36271b
Pipeline
#33298
passed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/tex/utiliser_versions/annuler_commits.tex
View file @
27685690
...
...
@@ -61,10 +61,82 @@ index a03f78c..5596950 100644
\begin{beamercolorbox}
[rounded=true, shadow=true]
{
terminal
}
\begin{Verbatim}
//TODO
$
git reset
--
soft HEAD~
1
\Pause
$
cat API.txt
\Pause
Je suis le premier fichier utilisé pour cette API sur git
J'ajoute une ligne à mon fichier
\end{Verbatim}
\end{beamercolorbox}
\end{frame}
\begin{frame}
[fragile]
\begin{beamercolorbox}
[rounded=true, shadow=true]
{
terminal
}
\begin{Verbatim}
$
git log
--
graph
--
decorate
--
all
\Pause
*
\textcolor
{
yellow
}{
commit a
04
da
653083
b
6
b
0
ba
3
eea
2
bce
98
d
903
acfd
0
a
4
d
3
(
}{
\bf\textcolor
{
cyan
}{
HEAD
-
>
}
\textcolor
{
green
}{
master
}}
\textcolor
{
yellow
}{
)
}
\textcolor
{
red
}{
|
}
Author: huetremy <remy.huet@etu.utc.fr>
\textcolor
{
red
}{
|
}
Date: Fri Jan
11
10
:
16
:
10
2019
+
0100
\textcolor
{
red
}{
|
}
\textcolor
{
red
}{
|
}
Troisième commit
\textcolor
{
red
}{
|
}
*
\textcolor
{
yellow
}{
commit
5
b
63
bd
1
f
9
afe
4685
b
60074030960
e
39
bb
5152
e
67
}
\textcolor
{
red
}{
|
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
\textcolor
{
red
}{
|
}
Date: Thu Jan
3
15
:
55
:
33
2019
+
0100
\textcolor
{
red
}{
|
}
\textcolor
{
red
}{
|
}
Second commit
\textcolor
{
red
}{
|
}
*
\textcolor
{
yellow
}{
commit
712951
dbb
3
ee
0
cc
4
d
248582
dc
5408
da
3
afdec
853
(
tag: mon
_
tag
)
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
Date: Thu Jan
3
15
:
37
:
54
2019
+
0100
Ajout du premier fichier
\end
{
Verbatim
}
\end
{
beamercolorbox
}
On voit bien grâce qux deux commandes précédentes que le commit a été supprimé mais que les modifications ont été gardées
\ldots
Maintenant :
\begin
{
beamercolorbox
}
[
rounded
=
true, shadow
=
true
]
{
terminal
}
\begin
{
Verbatim
}
$
git commit -am ''Commit de revert''
\Pause
[master eae33f2] Commit de revert
1 file changed, 1 deletion(-)
\end{Verbatim}
\end{beamercolorbox}
\end{frame}
\begin{frame}
[fragile]
\begin{beamercolorbox}
[rounded=true, shadow=true]
{
terminal
}
\begin{Verbatim}
$
git reset
--
hard HEAD~
1
\Pause
HEAD est maintenant à a
04
da
65
Troisième commit
\Pause
$
cat API.txt
\Pause
Je suis le premier fichier utilisé pour cette API sur git
J'ajoute une ligne à mon fichier
Encore une ligne en plus !
\Pause
$
git log
--
graph
--
decorate
--
all
\Pause
*
\textcolor
{
yellow
}{
commit a
04
da
653083
b
6
b
0
ba
3
eea
2
bce
98
d
903
acfd
0
a
4
d
3
(
}{
\bf\textcolor
{
cyan
}{
HEAD
-
>
}
\textcolor
{
green
}{
master
}}
\textcolor
{
yellow
}{
)
}
\textcolor
{
red
}{
|
}
Author: huetremy <remy.huet@etu.utc.fr>
\textcolor
{
red
}{
|
}
Date: Fri Jan
11
10
:
16
:
10
2019
+
0100
\textcolor
{
red
}{
|
}
\textcolor
{
red
}{
|
}
Troisième commit
\textcolor
{
red
}{
|
}
*
\textcolor
{
yellow
}{
commit
5
b
63
bd
1
f
9
afe
4685
b
60074030960
e
39
bb
5152
e
67
}
\textcolor
{
red
}{
|
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
\textcolor
{
red
}{
|
}
Date: Thu Jan
3
15
:
55
:
33
2019
+
0100
\textcolor
{
red
}{
|
}
\textcolor
{
red
}{
|
}
Second commit
\textcolor
{
red
}{
|
}
*
\textcolor
{
yellow
}{
commit
712951
dbb
3
ee
0
cc
4
d
248582
dc
5408
da
3
afdec
853
(
tag: mon
_
tag
)
}
Author: Thibaud Duhautbout <thibaud@duhautbout.ovh>
Date: Thu Jan
3
15
:
37
:
54
2019
+
0100
Ajout du premier fichier
\end
{
Verbatim
}
\end
{
beamercolorbox
}
Le commit a bien été effacé, mais cette fois les modifications n'ont pas été gardées
\end
{
frame
}
\begin
{
frame
}
[
fragile
]
...
...
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