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
10903c58
Commit
10903c58
authored
Jul 30, 2020
by
Grégory Mounié
Browse files
Merge branch 'master' of gricad-gitlab.univ-grenoble-alpes.fr:mounieg/formation-git into master
parents
19ad2169
b8a36a7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Ensimag_Advanced1h30/Makefile
View file @
10903c58
...
...
@@ -31,7 +31,7 @@ all: slides handouts
# lualatex necessary because one developper of git has a vietnamese name
PDFLATEX
=
lualatex
PDFLATEX_OPTIONS
=
-file-line-error
PDFLATEX_OPTIONS
=
-file-line-error
-shell-escape
LU_MASTERS
=
$(SLIDES)
$(HANDOUTS)
DEPENDS
=
$(TEXANIMS)
include
LaTeX.mk
...
...
Ensimag_Advanced1h30/advanced1h30.tex
View file @
10903c58
...
...
@@ -2,8 +2,18 @@
\usepackage
{
moy-bouveret-slides
_
lualatex
}
\usepackage
{
tikz
}
\usetikzlibrary
{
shapes
}
\usetikzlibrary
{
calc,fadings,shapes.arrows,shadows,backgrounds, positioning
}
% il exite mainteannt gitdags pour générer du tikz !
% \usepackage{gitdags}
\usepackage
{
moy-bouveret-tikz
}
\usepackage
{
comment
}
\usepackage
{
minted
}
\usemintedstyle
{
tango
}
\setminted
{
breaklines
}
\setminted
{
linenos=true
}
\definecolor
{
verylightgray
}{
rgb
}{
0.95,0.95,0.95
}
\setminted
{
bgcolor=verylightgray
}
\title
[Advanced Git]
{
Advanced Git
}
\subtitle
{
Pocket edition
}
...
...
@@ -50,7 +60,7 @@
\begin{frame}
[fragile]
\frametitle
{
\texttt
{
git status
}
, the single most important command
}
\lstinline
{
git status
}
displays the current state of the working
directory and the
various
most relevant commands.
directory and the most relevant commands
at the current state
.
\footnotesize
\begin{semiverbatim}
On branch master
...
...
@@ -100,27 +110,27 @@ no changes added to commit (use "git add" and/or "git commit -a")
\end{frame}
\begin{frame}
[fragile]
\frametitle
{
Who Makes Git? (Jan.
4th
20
19
)
}
\frametitle
{
Who Makes Git? (Jan.
3rd
20
20
)
}
\footnotesize
\def\employer
#1
{\(
\leftarrow
\text
{
\textsf
{
\alert
{
#
1
}}}\)}
\begin{semiverbatim}
\$
git shortlog -s --no-merges | sort -nr | head -30
6980 Junio C Hamano
\employer
{
Google (full-time on Git)
}
2958 Jeff King
\employer
{
GitHub (
\(
\approx
\)
full-time on Git)
}
1564 Nguyễn Thái Ngọc Duy
1319 Johannes Schindelin
\employer
{
Microsoft (full-time on Git)
}
1290 Shawn O. Pearce
\employer
{
Google
}
1103 Linus Torvalds
\textsf
{
(No longer very active contributor)
}
953 Michael Haggerty
\employer
{
GitHub
}
837 René Scharfe
778 Jonathan Nieder
\employer
{
Google
}
599 Stefan Beller
561 Ævar Arnfjörð Bjarmason
545 Christian Couder
\employer
{
Booking.com (50
\%
on Git)
}
...
286 Matthieu Moy ex-prof Ensimag
\textsf
{
(rank 26 / 1632)
}
\end{semiverbatim}
\begin{minted}
{
console
}
you@laptop
$
git shortlog
-
s
--
no
-
merges | sort
-
nr | head
-
26
7070
Junio C Hamano # Google
(
full
-
time on Git
)
3237
Jeff King # GitHub
(
almost full
-
time on Git
)
1824
Nguyễn Thái Ngọc Duy
1616
Johannes Schindelin # Microsoft
(
full
-
time on Git
)
1290
Shawn O. Pearce # Google
1104
Linus Torvalds # No longer very active,
1
ci in
2019
953
Michael Haggerty # GitHub
913
René Scharfe
783
Jonathan Nieder # Google
667
Ævar Arnfjörð Bjarmason
638
Stefan Beller
575
Christian Couder # Booking.com
(
50
% on Git)
...
286
Matthieu Moy # UCB
/
Ensl, ci when @ Ensimag
(
26
/
1740
)
\end
{
minted
}
\end
{
frame
}
% $
\subsection
{
Popularity
}
...
...
@@ -132,33 +142,47 @@ no changes added to commit (use "git add" and/or "git commit -a")
repositories on
GitHub''
\beamerbutton
{
\url
{
https:
//
github.com
/
about
/
press
}}
\item
2017
:
25
M people and
75
M repositories
\item
2019:
31
M people and 100M repositories
\item
How about Mercurial?
\\
[0.1cm]
\includegraphics
[width=.8\textwidth]
{
fig/mercurial-hosting
}
\item
Aug
2019
:
40
M people and
$
>
100
$
M repositories
\item
How about Mercurial?
Bitbucket: only Mercurial repos in
2008
,
drop it June
1
2020
, for becoming Git only.
\end
{
itemize
}
\end
{
frame
}
\begin
{
frame
}
[
fragile
]
\frametitle
{
Code: INIT
}
\frametitle
{
Code: INIT
1
/
2
}
\begin
{
exampleblock
}{
Create a minimalist repository
}
Create a simple repository with two files in
2
commits, one of the
file in a sub
-
directory.
\begin{
lstlisting}
[language=sh,gobble=6]
\begin
{
minted
}{
bash
}
mkdir MyRepo.git
cd MyRepo.git
git init .
touch myfile.txt
git add myfile.txt
git commit
-
m "first commit"
...
\end
{
minted
}
\end
{
exampleblock
}
\end
{
frame
}
\begin
{
frame
}
[
fragile
]
\frametitle
{
Code: INIT
2
/
2
}
\begin
{
exampleblock
}{
Create a minimalist repository
}
Create a simple repository with two files in
2
commits, one of the
file in a sub
-
directory.
\begin
{
minted
}{
bash
}
...
mkdir Subdir
touch Subdir
/
mysubfile.txt
git add Subdir
/
mysubfile.txt
git commit
-
m "second commit"
git config alias.lg "log --all --graph --oneline" # Bonus
git config
--
global
alias.lg "log
--
all
--
graph
--
oneline" # Bonus
git lg
\end{
lstlisting
}
\end
{
minted
}
\end
{
exampleblock
}
\end
{
frame
}
...
...
@@ -182,7 +206,7 @@ no changes added to commit (use "git add" and/or "git commit -a")
\frametitle
{
Where is the last commit ? What does it contain ?
}
\begin
{
exampleblock
}{
Data exploration
}
\begin{
lstlisting}
[language=sh,gobble=6]
\begin
{
minted
}{
bash
}
ls .git
cat .git
/
HEAD
cat .git
/
refs
/
heads
/
master
...
...
@@ -191,7 +215,7 @@ no changes added to commit (use "git add" and/or "git commit -a")
git cat
-
file
-
p SHA
1
_
DE
_
TREE # notez le SHA
1
de myfile.txt
git cat
-
file
-
p SHA
1
_
DE
_
SUBDIR
git cat
-
file
-
p SHA
1
_
DE
_
subfile.txt # identique au SHA
1
de subfile.txt
\end{
lstlisting
}
\end
{
minted
}
\end
{
exampleblock
}
\end
{
frame
}
...
...
MOSIG_AdvancedBasic2h/Makefile
View file @
10903c58
PDFLATEX_OPTIONS
=
-shell-escape
FILES
=
git-computer-lab.pdf README.org
FILES
=
git-computer-lab.pdf README.org
README.html
include
LaTeX.mk
README.html
:
README.org
emacs
--batch
README.org
--eval
"(org-html-export-to-html)"
upload-gitlab
:
$(FILES)
ls
/tmp/www-git
||
(
cd
/tmp/
&&
git clone git@gitlab.ensimag.fr:systemes/www-git.git
)
cd
/tmp/www-git
&&
git pull
cp
-a
$(FILES)
/tmp/www-git/public/
@
printf
"Documents copiés dans /tmp/www-git
\n
Penser à y faire git commit et git push pour les pousser vers gitlab"
MOSIG_AdvancedBasic2h/README.org
View file @
10903c58
...
...
@@ -11,6 +11,8 @@
#+select_tags: export
#+exclude_tags: noexport
#+creator: Emacs 26.3 (Org mode 9.2.3)
#+SETUPFILE: https://fniessen.github.io/org-html-themes/setup/theme-readtheorg.setup
* M1 Info: Introduction à Git
Le meilleur livre sur Git librement disponible
...
...
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