From 21cfb0b9e9988b914416f7fefd4d46cea0b4ce58 Mon Sep 17 00:00:00 2001
From: Philippe Dosch <Philippe.Dosch@loria.fr>
Date: Mon, 2 Apr 2018 21:44:28 +0200
Subject: [PATCH] Chgmt titre + git init

---
 gitrefcard.tex | 94 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 90 insertions(+), 4 deletions(-)

diff --git a/gitrefcard.tex b/gitrefcard.tex
index d13decf..dc8787e 100644
--- a/gitrefcard.tex
+++ b/gitrefcard.tex
@@ -9,31 +9,117 @@
 % Hack, built from both tocbibbind and scrreprt, in order to
 % have an index entry in the TOC referencing the good page
 % (a basic \addcontentsline before \printindex is not efficient enough)
-\usepackage{tocbibindphil}
+%\usepackage{tocbibindphil}
 
 \newcommand{\exindex}[1]{\index{#1@\texttt{#1}}}
 \newcommand{\inex}[1]{\input{exos/ex#1}}
 
+% Définition des couleurs
+\definecolor{localrep}{RGB}{204,255,204}
+\definecolor{index}{RGB}{204,207,255}
+\definecolor{workdir}{RGB}{255,204,204}
+\definecolor{gittitle}{HTML}{E9D66B}
+
+% Pour la définition des diagrammes
+\usepackage{tikz}
+
+% On active la génération de l'index
 \makeindex
 
 \begin{document}
 
 \begin{center}
-  \frame{\textbf{\Huge Aide mémoire Git}}
+  \begin{tikzpicture}
+    \tikzset{gitl/.style={draw,rectangle,rounded
+        corners=3pt,fill=gittitle,minimum width=3cm}}
+    \node[gitl] (T) at (0,0){\huge \textbf{~~Aide mémoire Git~~~}};
+  \end{tikzpicture}
+  % \frame{\textbf{\Huge Aide mémoire Git}}
 \end{center}
 
 %======================================================================
 \subsection{Résumé des commandes}
 %======================================================================
-\subsubsection{Commandes de base}
+\subsubsection{Création d'un dépôt}
+%======================================================================
+
+% On neutralise le retrait première ligne
+\setlength{\parindent}{0pt}
+
+\begin{tabular}{p{1.7cm}l}
+\ex{git init}\exindex{git init} & Création d'un
+dépôt\index{depot@dépôt} vide\\
+\ex{git clone}\exindex{git clone} & Clone d'un
+dépôt\index{depot@dépôt}\\
+\end{tabular}
+
+%======================================================================
+\subsubsection{Création d'un dépôt}
+%======================================================================
+
+\begin{tabular}{p{1.7cm}l}
+\ex{git init}\exindex{git init} & Création d'un
+dépôt\index{depot@dépôt} vide\\
+\ex{git clone}\exindex{git clone} & Clone d'un
+dépôt\index{depot@dépôt}\\
+\end{tabular}
+
+%======================================================================
+\subsection{Scénarios classiques}
 %======================================================================
 
-\ex{git init} : création d'un dépôt vide
+%======================================================================
+\subsection{Commandes utiles}
+%======================================================================
+
+%======================================================================
+\subsection{Configuration}
+\label{sec:conf}
+%======================================================================
 
 %======================================================================
 \subsection{Détail des commandes}
 %======================================================================
 
+% On rétablit le retrait première ligne
+\setlength{\parindent}{10.95pt}
+
+%======================================================================
+\subsubsection{\ex{git init}}
+\label{sec:gitinit}
+%======================================================================
+
+Remarques :
+\begin{itemize}
+\item
+  Nécessaire pour un travail collaboratif, mais déjà très utile pour
+  un travail en autonomie : \textit{overhead} réduit, gestion de
+  l'historique, manipulations en tout genres...
+\item
+  Crée une branche par défaut, la branche \ex{master}
+\item
+  Impossible de faire un \ex{git log} tant qu'un commit n'a pas été
+  réalisé
+\item
+  Avant la création du premier dépôt, penser à configurer globalement
+  \ex{git}~\myref{conf}.
+\end{itemize}
+
+\begin{tikzpicture}
+  % \draw [localrep,very thick] (1,1) circle(1);
+  % \draw [very thin, gray] (-1,-1) grid[step=0.5](2,2);
+  % \tikzstyle{localrep}=[draw,rectangle,rounded corners=3pt,localrep]
+  \tikzset{slr/.style={draw,rectangle,rounded
+      corners=3pt,fill=localrep,minimum width=3cm}}
+  \tikzset{sin/.style={draw,rectangle,rounded
+      corners=3pt,fill=index,minimum width=3cm}}
+  \tikzset{swd/.style={draw,rectangle,rounded
+      corners=3pt,fill=workdir,minimum width=3cm}}
+  \node[slr] (L) at (0,0){\begin{tabular}{c}Yop\\\raisebox{3mm}{\rule{2.5cm}{0.4pt}}\\ Argh\\Plouf\end{tabular}};
+  \node[sin] (I) at (4,0){Yop};
+  \node[swd] (W) at (8,0){Zap !};
+\end{tikzpicture}
+
 \printindex
 
 
-- 
GitLab