Commit b8a36a7c authored by Grégory Mounié's avatar Grégory Mounié
Browse files

minted and revision

- passage a minted pour les codes
- revisions mineur du contenu (maj auteurs de git)
parent e7cc2a9e
......@@ -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
......
......@@ -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 2019)}
\frametitle{Who Makes Git? (Jan. 3rd 2020)}
\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: 25M people and 75M repositories
\item 2019: 31M people and 100M repositories
\item How about Mercurial?\\[0.1cm]
\includegraphics[width=.8\textwidth]{fig/mercurial-hosting}
\item Aug 2019: 40M 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 SHA1_DE_TREE # notez le SHA1 de myfile.txt
git cat-file -p SHA1_DE_SUBDIR
git cat-file -p SHA1_DE_subfile.txt # identique au SHA1 de subfile.txt
\end{lstlisting}
\end{minted}
\end{exampleblock}
\end{frame}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment