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
Gregory Mounie
formation-git
Commits
38029253
Commit
38029253
authored
Sep 08, 2020
by
Grégory Mounié
Browse files
few typos
parent
721f02ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
MOSIG_AdvancedBasic2h/git-model-computer-lab.tex
View file @
38029253
...
...
@@ -50,7 +50,7 @@
\fancyhead
[HC]
{
\includegraphics
[height=2cm]
{
ensimag.jpg
}}
\fancyhead
[HR]
{
\includegraphics
[width=4.5cm]
{
GINP
_
BlocLogo.png
}}
This document is available here
~
:
\\
This document is available here:
\\
\begin{center}
\url
{
http://systemes.pages.ensimag.fr/www-git/git-model-computer-lab.pdf
}
\end{center}
...
...
@@ -75,7 +75,7 @@ most of the basic command effect.
These exercises can be done alone. We advise to do it in team of
two. Each member of the team will do all the commands. Thus, each
member should explain to the other its understanding. Exchanging with
your teamate will force you to slow your pace and consider all the
your team
m
ate will force you to slow your pace and consider all the
details more carefully.
Let us look now at the content of the
\texttt
{
.git
}
directory.
...
...
@@ -88,11 +88,11 @@ then a minimalist repository.
\subsection
{
ZLIB cat in python
}
The goal of the following program is to show you that Git use plain
Zlib compression format. Thus the file contents easily read
e
able. Zlib
is part of the standard library of libpng, python or Java and a
n
Zlib compression format. Thus
,
the file contents
are
easily readable. Zlib
is part of the standard library of libpng, python or Java and a
ubiquitous compression format (cf. https://en.wikipedia.org/wiki/Zlib)
The code can be directly downlo
c
aded from
The code can be directly downloaded from
\url
{
http://recherche.noiraudes.net/resources/git/TP/zlibcat.py3
}
)
\inputminted
{
python
}{
../FormaContinue
_
MeteoNov2017/TPs/zlibcat.py3
}
...
...
@@ -131,7 +131,7 @@ You should find a file \texttt{HEAD}. Read its content.
The current state of the working directory
(
HEAD
)
is written in the
\texttt
{
HEAD
}
file. Following the value in the
\texttt
{
refs
/
}
directory, find the file content with the SHA
-
1
variable of the head
et
note its value.
and
note its value.
First check that the value of the SHA
-
1
is the same as the commit.
\begin
{
minted
}{
console
}
...
...
@@ -140,8 +140,8 @@ $ git log
\subsection
{
From SHA-1 to SHA-256
}
Git is
transitionn
ing, very slowly, from SHA-1 hash to SHA-256
to
evade from the vulnerabilities of SHA-1.
Git is
mov
ing, very slowly
and carefully
, from SHA-1 hash to SHA-256
hash to
evade from the vulnerabilities of SHA-1.
\section
{
Content-addressable storage: the
\texttt
{
objects/
}
directory
}
...
...
@@ -219,7 +219,7 @@ $ git gc
\end{minted}
A new
\texttt
{
pack
}
file (and
\texttt
{
.idx
}
) is now present in the
\texttt
{
objects/pack/ directory
}
. Th
e
pack file includes the file
\texttt
{
objects/pack/
}
directory. Th
is
pack file includes the file
contents with delta. The following command allow to display the table
of content of the pack:
\begin{minted}
{
console
}
...
...
@@ -235,7 +235,7 @@ The tags are given to a particular commit in order to find them again
later. They are quite similar to branches but never move their head
after their creation.
Create a tag on the current commit
~
:
Create a tag on the current commit:
\begin{minted}
{
console
}
$
git tag v
0
.
1
\end
{
minted
}
...
...
@@ -246,7 +246,7 @@ be the same as the current HEAD:
cat .git
/
refs
/
tags
/
v
0
.
1
\end
{
minted
}
Now, move forward the
\texttt
{
master
}
branch
~
:
Now, move forward the
\texttt
{
master
}
branch:
\begin
{
minted
}{
console
}
$
emacs file2.txt # insert few lines
...
...
@@ -303,7 +303,7 @@ following command:
$
git show develop
\end{minted}
Get the working directory related to this commit (
\texttt
{
checkout
}
)
~
:
Get the working directory related to this commit (
\texttt
{
checkout
}
):
\begin{minted}
{
console
}
$
git checkout <SHA
-
1
commit>
\end
{
minted
}
...
...
@@ -372,7 +372,7 @@ Come back to the \texttt{master}:
$
git checkout master
\end{minted}
Redo the same manipulation as in
sub
section
\ref
{
sec:headless
}
, but
Redo the same manipulation as in section
~
\ref
{
sec:headless
}
, but
using the branch name
\texttt
{
develop
}
instead of the commit number of
the branch.
...
...
@@ -404,8 +404,10 @@ Try and check !
\section
{
Conclusion
\dots
{}}
Git data storage is addressable by content. The link between files are
a direct acyclic graph, with several source
(
entry points
)
. Most Git
commands create new nodes, new sources or navigate in the graphe.
a direct acyclic graph, with several sources
(
entry points
)
. Most Git
commands create new nodes, new sources or navigate in the
graph. Understanding this graph management is the main challenge of
Git, and almost the only challenge.
\end
{
document
}
...
...
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