#+TITLE: Démystifions Git, Github, Gitlab #+AUTHOR:   # @@latex:{\large Arnaud Legrand} \\ \vspace{0.2cm}Grenoble Alpes University and CNRS\\ \vspace{0.2cm} \texttt{arnaud.legrand@imag.fr}@@ #+DATE:   #+OPTIONS: H:2 tags:nil toc:nil #+LANGUAGE: fr #+EXCLUDE_TAGS: noexport #+SELECT_TAGS: export #+TAGS: noexport(n) ignore(i) #+LATEX_COMPILER: lualatex #+LATEX_CLASS: beamer #+LATEX_CLASS_OPTIONS: [presentation,xcolor=dvipsnames,bigger] #+LATEX_HEADER: \usepackage[normalem]{ulem} #+LATEX_HEADER: \usedescriptionitemofwidthas{} #+LATEX_HEADER: \usepackage[francais]{babel} #+LATEX_HEADER: \usepackage{tikz} #+LATEX_HEADER: \usetikzlibrary{babel} #+LATEX_HEADER: \usetikzlibrary{positioning} #+LATEX_HEADER: \usetikzlibrary{fit} #+LATEX_HEADER: \usepackage{gitdags} #+LATEX_HEADER:\usepackage[strict=true,french=guillemets]{csquotes} #+LATEX_HEADER: \setbeamertemplate{itemize items}{$\bullet$} #+LATEX_HEADER: \usecolortheme[named=BrickRed]{structure} #+LATEX_HEADER: %\useinnertheme{circles} # #+LATEX_HEADER: \usetikzlibrary{arrows} # #+LATEX_HEADER: \usetikzlibrary{graphs} # #+LATEX_HEADER: \usetikzlibrary{trees} # #+LATEX_HEADER: \usetikzlibrary{graphdrawing} # #+LATEX_HEADER: \usegdlibrary{layered} # #+LATEX_HEADER: \usetikzlibrary{arrows, graphs, graphs.standard, trees, graphdrawing, quotes, positioning, shadows, shapes, mindmap} #+LATEX_HEADER: \let\maketitlesave=\maketitle #+LATEX_HEADER: \def\maketitle{} #+BEAMER_HEADER: \setbeamercovered{invisible} #+BEAMER_HEADER: \beamertemplatenavigationsymbolsempty #+STARTUP: beamer #+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col) %8BEAMER_OPT(Opt) #+STARTUP: indent #+PROPERTY: header-args :eval no-export #+LaTeX: \newcommand<>\gd[1]{\only#2{\gitDAG[grow up=1, branch right=1]{#1}};} #+LaTeX: \newcommand<>\gc[2]{\only#3{\gitcontent{#1}{#2}}} #+LaTeX: \newcommand<>\ga[2]{\only#3{\node[DAGref,fill = white, align=center, font = \normalsize, #2] () {#1};}} #+LaTeX: \let\alert=\textbf #+LaTeX: \begin{frame}\frametitle{}\centerline{\LARGE \textcolor{BrickRed}{Démystifions Git, Github, Gitlab}}\tableofcontents\end{frame} * Notion d'historique #+LaTeX: \AtBeginSection[]{\begin{frame}\frametitle{}\centerline{\LARGE \textcolor{BrickRed}{Démystifions Git, Github, Gitlab}}\tableofcontents[currentsection]\end{frame}} ** Aaah... l'informatique *** Problème #+ATTR_BEAMER: :overlay <+-> - Mon ordinateur a planté! - Ce document était bien mieux hier! - Vous n'avez pas travaillé sur la bonne version du document. - Comment fusionner? - Mais qui a écrit ça ? Et pourquoi ? *** Solution ? #+ATTR_BEAMER: :overlay <+-> - Sauvegarde régulière avec une notion d'historique\smallskip #+BEGIN_EXPORT latex \footnotesize\enquote{\texttt{thesis\_slides\_16x9\_Template\_Arial\only<+->{\_FINAL\only<+->{\_FINAL\only<+->{\_0925}}}.pptx}} #+END_EXPORT - Passer son temps à (s')envoyer des mails! ** Gestionnaire de versions Les gestionnaires de version datent du début des années 70 *** Fonctionnalités essentielles - Conserve un historique des modifications sans dupliquer les dossiers de sauvegardes - Sauvegarde les données (avec l’historique) sur des ordinateurs distants - Fusion "automatique" des fichiers édités par plusieurs personnes *** \includegraphics[height=.6cm]{img_git/Logo_Git.pdf} #+LaTeX: \begin{columns} #+LaTeX: \begin{column}{.8\linewidth} - 2005: créé pour le développement du noyau Linux par Linus Torvalds - $> 20$ millions de lignes de code - $\approx 14\,000$ developeurs # #+ATTR_LaTeX: :width .3\linewidth # file:img_git/Logo_Git.pdf # #+BEGIN_QUOTE # Only wimps use tape backup: _real_ men just upload their important stuff on # ftp, and let the rest of the world mirror it ;)\flushright # -- Linus Torvalds # #+END_QUOTE #+LaTeX: \end{column} #+LaTeX: \begin{column}{.2\linewidth} #+ATTR_LaTeX: :width .55\linewidth file:img_git/linus.jpg #+LaTeX: \end{column} #+LaTeX: \end{columns} ** Objectif de cet exposé #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{0cm} % \begin{flushright} \null\vspace{-2.0cm}% \hbox{\hspace{8cm}\includegraphics[height=0.6\paperheight]{img_git/Git_Xkcd.png}} % \end{flushright} \end{overlayarea} #+END_EXPORT - +Apprendre à utiliser =git= en ligne de\newline commande+ \vspace{.6cm} \pause =git= est "explicite" (à la différence \newline de dropbox et autres)\medskip\newline Heureusement, il y a des interfaces \vspace{.8cm} - Notions essentielles pour utiliser les interfaces à =git= - Historique distribué - Branche - Conflit et fusion - L'écosystème #+LaTeX: \raisebox{-.3em}{\includegraphics[height=.5cm]{img_git/Logo_Git.pdf}}\smallskip #+BEGIN_EXPORT latex \includegraphics[height=.5cm]{img_git/Logo_GitHub.pdf} \includegraphics[height=.5cm]{img_git/Octocat.jpg} \quad \resizebox{!}{.5cm}{GitLab} \includegraphics[height=.5cm]{img_git/Logo_GitLab.png} #+END_EXPORT #+LaTeX: \vfill # * L'historique quand on est tout seul ** Son propre projet #+LaTeX: \begin{columns} #+LaTeX: \begin{column}{.13\linewidth} #+LaTeX: \includegraphics<1>[width=\linewidth]{img_git/continuous_history_1.pdf}% #+LaTeX: \includegraphics<2->[width=\linewidth]{img_git/continuous_history_2.pdf} #+LaTeX: \end{column} #+LaTeX: \begin{column}{.8\linewidth} Accès à un certain nombre de fichiers. #+ATTR_BEAMER: :overlay <+-> - Temps continu - Checkpoint/snapshot: conserver les moments clés du projet pour pouvoir y revenir - git *add* pour indiquer quelles modifications on souhaite conserver - git *commit* pour faire le checkpoint (date, commentaire) #+LaTeX: \end{column} #+LaTeX: \end{columns} ** Une histoire simple #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{8cm} \begin{tikzpicture} \useasboundingbox (0,0) rectangle (5,8); % \draw (current bounding box.north east) -- (current bounding box.north west) -- (current bounding box.south west) -- (current bounding box.south east) -- cycle; \tikzset{DAGcommit/.append style={minimum height = 1em, minimum width=1em}, DAGedge/.append style={thin}, DAGrefedge/.append style={thin}, special commit/.style={DAGcommit,fill= solarized-red!20}} \node[anchor=south west](simple) at (.5,0) {\tikz{ % \node[DAGcommit, at (3,0)] (v1) {v1}; \gd<+>{ v1 } \gc<.->{article.md img/fig1.jpg}{left=of v1} \gd<+>{ v1 -- v2 } \gc<.->{article.md}{left=of v2} \gd<+>{ v1 -- v2 -- v3 } \gc<.->{article.md img/fig2.jpg}{left=of v3} \gd<+>{ v1 -- v2 -- v3 -- v4 } \gc<.->{article.md}{left=of v4} \gd<+>{ v1 -- v2 -- v3 --v4 -- v5 -- v6} \gc<.->{article.md img/me.jpg}{left=of v5} \gc<.>{article.md}{left=of v6} \gd<+>{ v1 -- v2 -- v3 --v4 -- v5 -- {{[nodes=unreachable] v6}}} \only<.>{\draw[->,-Latex] (v6) to[out=0,in=0] (v5);} \gd<+>{ v1 -- v2 -- v3 --v4 -- v5 -- {{[nodes=unreachable] v6}, v6'}} \gd<+->{ v1 -- v2 -- v3 --v4 -- v5 -- {{[nodes=unreachable] v6}, v6' -- v7 -- v8}} \ga<+>{git \textbf{add} ...  \\git \textbf{commit}}{right=of v1, yshift=+1.6ex} \ga<.>{Chaque version du projet\\ (appelée \emph{commit} ou \emph{révision})\\ est identifiée par un SHA1\\\scalebox{.55}{\texttt{4fd4d17f73d4c024fb3ef69fb336cc10f2cd9b26}}}{right=of v4} %text width=3cm, \ga<.>{Un \textbf{historique} \\à la granularité\\ du \sout{fichier} projet}{right=of v7} %text width=3cm, \only<+>{\draw[<->,Latex-Latex, dashed] (v8) to[out=0,in=0] (v4);} \ga<.>{git \textbf{diff} v4..v8}{right=of v7} \only<+>{\draw[->,-Latex] (v8) to[out=0,in=0] (v6');} \ga<.>{git \textbf{checkout} v6'}{right=of v7} \ga<+>{Tout ce qui a été commité\\est sauvegardé et accessible}{right=of v4} \ga<.>{Cet historique est\\ \textbf{local}!}{right=of v2} }}; % % HEAD reference % \gitHEAD % {left=of master} % {master} \end{tikzpicture} \end{overlayarea} #+END_EXPORT # https://tikzit.github.io/ # dot2tex... bof # https://pdfs.semanticscholar.org/bb76/d0dc3b4a38a15dcf5c4572a5cf9f121fef7e.pdf # /usr/share/doc/texlive-doc/generic/pgf/pgfmanual.pdf # - 5. Tutorial: Diagrams as Simple Graphs ** Backup sur un server distant #+BEGIN_EXPORT latex \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \begin{overlayarea}{\linewidth}{5cm} \begin{tikzpicture} \useasboundingbox (0,0) rectangle (6cm,5cm); % \draw (current bounding box.north east) -- (current bounding box.north west) -- (current bounding box.south west) -- (current bounding box.south east) -- cycle; \tikzset{DAGcommit/.append style={minimum height = 1em, minimum width=1em}, DAGedge/.append style={thin}, DAGrefedge/.append style={thin}, special commit/.style={DAGcommit,fill= solarized-red!20}, every node/.style={transform shape}} % \tikzset{res/.style={ellipse,draw,minimum height=0.5cm,minimum width=0.8cm}} % \tikzset{literal/.style={rectangle,draw,minimum height=0.5cm,minimum width=0.8cm,text width = 1.2 cm, align = center}} \tikzset{hfit/.style={rounded rectangle, inner xsep=0pt}, vfit/.style={rounded corners}} \begin{scope}[scale = .5] \gd<1>{ v1 } \ga<1>{\LARGE git {\bf clone}}{right=of v1} \begin{pgfonlayer}{background} \node<1>[fit=(v1), fill=green!30, ellipse, opacity=.8] {}; \end{pgfonlayer} \gd<2-3>{ v1 -- v2 -- v3 --v4 } \ga<2>{\Large Alice travaille en local}{right=of v1} \ga<3>{\LARGE git {\bf push}}{right=of v1} \begin{pgfonlayer}{background} \node<3>[fit=(v1)(v4), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<4-6>{ v1 -- v2 -- v3 --v4 -- v5 -- {{[nodes=unreachable] v6}, v6' -- v7 -- v8}} \ga<4>{\Large Alice travaille en local}{right=of v1} \ga<5>{\LARGE git {\bf push}}{right=of v1} \begin{pgfonlayer}{background} \node<5>[fit=(v5)(v8), fill=green!30,ellipse,rotate=-30] {}; \end{pgfonlayer} \node[DAGref,fill = white, below=of v1,remember picture] (alice) {\includegraphics[width=2cm]{img_git/alice.jpg}}; \end{scope} \begin{scope}[scale = .5, xshift = 8cm, yshift = 3cm, every node/.style={transform shape}] \gd<1-2>{ v1 } \begin{pgfonlayer}{background} \node<1>[fit=(v1), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<3-4>{ v1 -- v2 -- v3 --v4 } \begin{pgfonlayer}{background} \node<3>[fit=(v1)(v4), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<5-6>{ v1 -- v2 -- v3 --v4 -- v5 -- v6' -- v7 -- v8} \begin{pgfonlayer}{background} \node<5>[fit=(v5)(v8), fill=green!30, ellipse, opacity=.8] {}; % \filldraw<5>[fill=green!20!white, draw=green!50!black] v5.east -- v8 -- (-1,-3) -- cycle; \end{pgfonlayer} \node[DAGref,fill = white, below=of v1, remember picture] (gitlab) {\includegraphics[width=2cm]{img_git/Logo_GitLab.png}}; \end{scope} \only<1>{\draw[->,-Latex] (gitlab) to[out=180,in=0] (alice);} \only<3>{\draw[->,-Latex] (alice) to[out=0,in=180] (gitlab);} \only<5>{\draw[->,-Latex] (alice) to[out=0,in=180] (gitlab);} \ga<6>{On synchronise des \textbf{branches}\\ en échangeant \\des morceaux d'historiques}{right=of v7} % \ga<6>{Changer l'ellipse d'Alice}{right=of v1} % % HEAD reference % \gitHEAD % {left=of master} % {master} \end{tikzpicture} \end{overlayarea} #+END_EXPORT *** cruft :noexport: #+BEGIN_EXPORT latex \begin{tikzpicture}[ rotate=180, nodes={ text height=.7em, text depth=.2em, draw=black!20, thick, fill=white, font=\footnotesize }, >=stealth', rounded corners, semithick ] \graph [ % simple necklace layout, % circular % spring layout, % force layered layout, % layered % tree layout, % trees % binary tree layout, % trees level distance=1cm, sibling sep=.5em, sibling distance=1cm ] { % AA -- {BB -- {CC, CC3 -- {DD1, DD2}},AAA}; "merge" -> {head -- v1,b} -- c -- d; }; \end{tikzpicture} \begin{tikzpicture} % \usegdlibrary{layered} % Commit DAG \graph[layered layout,grow up sep = 2em]{ AA -- {BB -- {CC, CC3 -- {DD1, DD2}},AAA}; merge <- {head -- v1,b} -- c -- d; A -- B -- { C, D -- E, }; }; \draw[red, dashed] (1, 0.5) -- (1, -5); \end{tikzpicture} #+END_EXPORT ** Crédits - A cropped and rotated version of an image of Linus Torvalds speaking at the LinuxCon Europe 2014 in Düsseldorf. CC BY-SA 4.0. https://fr.wikipedia.org/wiki/Linus_Torvalds#/media/Fichier:LinuxCon_Europe_Linus_Torvalds_03_(cropped).jpg - Git. XKCD, A webcomic of romance, sarcasm, math, and language. CC BY-NC 2.5. Permanent link to this comic: https://xkcd.com/1597/ - Un grand remerciement à Benoît Vinot qui m'a fourni deux présentations en beamer + tikz déjà très proches de ce que je souhaitais présenter. - Merci à Vincent Danjean pour avoir repéré les nombreuses petites incohérences qui trainaient dans les noms de branches. * Travailler à plusieurs ** Collaborer = gérer un historique distribué :noexport: #+BEGIN_EXPORT latex \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \begin{overlayarea}{\linewidth}{5cm} \begin{tikzpicture} \useasboundingbox (0,0) rectangle (6cm,5cm); % \draw (current bounding box.north east) -- (current bounding box.north west) -- (current bounding box.south west) -- (current bounding box.south east) -- cycle; \tikzset{DAGcommit/.append style={minimum height = 1em, minimum width=1em}, DAGedge/.append style={thin}, DAGrefedge/.append style={thin}, special commit/.style={DAGcommit,fill= solarized-red!20}, every node/.style={transform shape}} % \tikzset{res/.style={ellipse,draw,minimum height=0.5cm,minimum width=0.8cm}} % \tikzset{literal/.style={rectangle,draw,minimum height=0.5cm,minimum width=0.8cm,text width = 1.2 cm, align = center}} \tikzset{hfit/.style={rounded rectangle, inner xsep=0pt}, vfit/.style={rounded corners}} \begin{scope}[scale = .5] \gd<1>{ v1 } \ga<1>{\LARGE git {\bf clone}}{right=of v1} \begin{pgfonlayer}{background} \node<1>[fit=(v1), fill=green!30, ellipse, opacity=.8] {}; \end{pgfonlayer} \gd<2-3>{ v1 -- v2 -- v3 --v4 } \ga<2>{\Large Alice working locally}{right=of v1} \ga<3>{\LARGE git {\bf push}}{right=of v1} \begin{pgfonlayer}{background} \node<3>[fit=(v1)(v4), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<4-5>{ v1 -- v2 -- v3 --v4 -- v5 -- {{[nodes=unreachable] v6}, v6' -- v7 -- v8}} \ga<4>{\Large Alice working locally}{right=of v1} \ga<5>{\LARGE git {\bf push}}{right=of v1} \begin{pgfonlayer}{background} \node<5>[fit=(v5)(v8), fill=green!30,ellipse,rotate=-30] {}; \end{pgfonlayer} \node[DAGref,fill = white, below=of v1,remember picture] (linus) {\includegraphics[width=2cm]{img_git/alice.jpg}}; \end{scope} \begin{scope}[scale = .5, xshift = 5cm, yshift = 5cm, every node/.style={transform shape}] \gd<1-2>{ v1 } \begin{pgfonlayer}{background} \node<1>[fit=(v1), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<3-4>{ v1 -- v2 -- v3 --v4 } \begin{pgfonlayer}{background} \node<3>[fit=(v1)(v4), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<5->{ v1 -- v2 -- v3 --v4 -- { v5 -- v6' -- v7 , v5'' -- v6''} -- {Merge} } \begin{pgfonlayer}{background} \node<5>[fit=(v5)(v8), fill=green!30, ellipse, opacity=.8] {}; % \filldraw<5>[fill=green!20!white, draw=green!50!black] v5.east -- v8 -- (-1,-3) -- cycle; \end{pgfonlayer} \node[DAGref,fill = white, below=of v1, remember picture] (gitlab) {\includegraphics[width=2cm]{img_git/Logo_GitLab.png}}; \end{scope} \begin{scope}[scale = .5, xshift = 10cm, yshift = 0cm, every node/.style={transform shape}] \gd<1-2>{ v1 } \begin{pgfonlayer}{background} \node<1>[fit=(v1), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<3-4>{ v1 -- v2 -- v3 --v4 } \begin{pgfonlayer}{background} \node<3>[fit=(v1)(v4), fill=green!30, ellipse] {}; \end{pgfonlayer} \gd<5->{ v1 -- v2 -- v3 --v4 -- { v5''[fill=blue] -- v6''}} \begin{pgfonlayer}{background} % \node<5>[fit=(v5)(v8), fill=green!30, ellipse, opacity=.8] {}; % \filldraw<5>[fill=green!20!white, draw=green!50!black] v5.east -- v8 -- (-1,-3) -- cycle; \end{pgfonlayer} \node[DAGref,fill = white, below=of v1, remember picture] (baby) {\includegraphics[width=2cm]{img_git/baby1.jpg}}; \end{scope} \only<1>{\draw[->,-Latex] (gitlab) to[out=0,in=0] (linus);} \only<3>{\draw[->,-Latex] (linus) to[out=0,in=0] (gitlab);} \only<5>{\draw[->,-Latex] (linus) to[out=0,in=0] (gitlab);} % % HEAD reference % \gitHEAD % {left=of master} % {master} \end{tikzpicture} \end{overlayarea} #+END_EXPORT **   :PROPERTIES: :BEAMER_OPT: fragile :END: *** Header :ignore: #+BEGIN_EXPORT latex \null\vspace{-8mm} \scalebox{.75}{ \begin{tikzpicture}[remember picture] \tikzset{DAGcommit/.append style={minimum height = 1em, minimum width=1em}, DAGedge/.append style={thin}, DAGrefedge/.append style={thin}, special commit/.style={DAGcommit,fill= solarized-red!20}} #+END_EXPORT *** Chloé :ignore: #+BEGIN_EXPORT latex % Chloé \node (historique de Chloe) at (0,0) {\tikz[remember picture]{ % Commit DAG \onslide<1-3>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C }; % Branch \gitbranch {master} {left=of C} {C} % HEAD reference \gitHEAD {left=of master} {master} } \onslide<4>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E }; % Branch \gitbranch {master} {left=of E} {E} % HEAD reference \gitHEAD {left=of master} {master} } \onslide<5-9>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E -- F1[as=F] }; % Branch \gitbranch {master} {left=of F1} {F1} % HEAD reference \gitHEAD {left=of master} {master} } \onslide<10>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E -- { G, F, } -- H }; % Branch \gitbranch {master} {left=of H} {H} % HEAD reference \gitHEAD {left=of master} {master} } % % Tag reference % \gittag % [v0p1] % {v0.1} % {left=of A} % {A} \node[DAGref,fill = white, below= of A] {\includegraphics[height=10mm]{img_git/alice.jpg}}; } }; #+END_EXPORT *** Origin/master between Chloé and Benoît :ignore: #+BEGIN_EXPORT latex % Origin/master commun \onslide<1-2>{ % Remote branch \gitremotebranch [origmaster1] {origin/master} {right=of C} {C} } \onslide<3>{ % Remote branch \gitremotebranch [origmaster1] {origin/master} {right=of C,opacity=0.5} {C} } \onslide<4-5>{ % Remote branch \gitremotebranch [origmaster2] {origin/master} {right=of E} {E} } \onslide<6-8>{ % Remote branch \gitremotebranch [origmaster] {origin/master} {right=of F1} {F1} } \onslide<9>{ % Remote branch \gitremotebranch [origmaster] {origin/master} {right=of F1,opacity=0.5} {F1} } \onslide<10>{ % Remote branch \gitremotebranch [origmaster3] {origin/master} {right=of H} {H} } #+END_EXPORT *** Benoît :ignore: #+BEGIN_EXPORT latex % Benoît \node[right=2.25 of historique de Chloe.south east,anchor=south west] (historique de Benoit) {\tikz[remember picture]{ % Commit DAG \onslide<1>{ \gitDAG[grow up=0.75, branch right=0.75]{ A -- B -- C }; % Branch \gitbranch {master} {right=of C} {C} % HEAD reference \gitHEAD {right=of master} {master} } \onslide<2-4>{ \gitDAG[grow up=0.75, branch right=0.75]{ A -- B -- C -- D -- E }; % Branch \gitbranch {master} {right=of E} {E} % HEAD reference \gitHEAD {right=of master} {master} } \onslide<5-7>{ \gitDAG[grow up=0.75, branch right=0.75]{ A -- B -- C -- D -- E -- G }; % Branch \gitbranch {master} {right=of G} {G} % HEAD reference \gitHEAD {right=of master} {master} } \onslide<8-10>{ \gitDAG[grow up=0.75, branch right=0.75]{ A -- B -- C -- D -- E -- { G, F, } -- H }; % Branch \gitbranch {master} {right=of H} {H} % HEAD reference \gitHEAD {right=of master} {master} } % % Tag reference % \gittag % [v0p1] % {v0.1} % {right=of A} % {A} % \node[DAGref,fill = white, below= of A] {\includegraphics[height=10mm]{img_git/bob.jpg}}; } }; #+END_EXPORT *** Origin/master between Chloé and Benoît :ignore: #+BEGIN_EXPORT latex % Liens de Benoît avec Origin/master \draw<1-2>[DAGrefedge] (C) -- (origmaster1); \onslide<3>{ % Remote branch \gitremotebranch [origmaster2] {origin/master} {left=of E} {E} } \draw<4-5>[DAGrefedge] (E) -- (origmaster2); \onslide<6-7>{ % Remote branch \gitremotebranch [origmaster2] {origin/master} {left=of E, opacity=0.5} {E} } \draw<8>[DAGrefedge] (F) -- (origmaster); \onslide<9>{ % Remote branch \gitremotebranch [origmaster3] {origin/master} {left=of H} {H} } \draw<10>[DAGrefedge] (H) -- (origmaster3); #+END_EXPORT *** Gitlab :ignore: #+BEGIN_EXPORT latex % Dépôt origin \node[font=\fontfamily{lmtt}\selectfont\small, above=0.35 of current bounding box.north,above] (origin) {\tikz[scale = .5, every node/.style={transform shape}, remember picture]{ % Commit DAG \onslide<1-2>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C }; % Branch \gitbranch {master} {left=of C} {C} % % HEAD reference % \gitHEAD % {left=of master} % {master} } \onslide<3-5>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E }; % Branch \gitbranch {master} {left=of E} {E} % % HEAD reference % \gitHEAD % {left=of master} % {master} } \onslide<6-8>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E -- F }; % Branch \gitbranch {master} {left=of F} {F} % % HEAD reference % \gitHEAD % {left=of master} % {master} } \onslide<9-10>{ \gitDAG[grow up=0.75, branch left=0.75]{ A -- B -- C -- D -- E -- { G, F, } -- H }; % Branch \gitbranch {master} {left=of H} {H} % % HEAD reference % \gitHEAD % {left=of master} % {master} } % % Tag reference % \gittag % [v0p1] % {v0.1} % {left=of A} % {A} \node[DAGref,fill = white, below= of A] {\includegraphics[height=2cm]{img_git/Logo_GitLab.png}}; } }; #+END_EXPORT *** Actions :ignore: #+BEGIN_EXPORT latex \onslide<1-2>{ % Remote branch \gitremotebranch [origmaster] {master} {right=of C} {C} } % Actions % Push de Benoît \draw<3>[->,-Latex] (historique de Benoit) to[out=90,in=0] node[midway,font=\scriptsize,above right]{\texttt{git push}} (origin); \onslide<3-5>{ % Remote branch \gitremotebranch [origmaster] {master} {right=of E} {E} } % Pull de Chloé \draw<4>[->,-Latex] (origin) to[out=180,in=90] node[midway,font=\scriptsize,above left]{\texttt{git pull}} (historique de Chloe); % Push de Chloé \draw<6>[->,-Latex] (historique de Chloe) to[out=90,in=180] node[midway,font=\scriptsize,above left]{\texttt{git push}} (origin); % Push raté de Benoît \draw<7>[->,-Latex] (historique de Benoit) to[out=90,in=0] node[midway,font=\scriptsize,above right, strike out, draw=red, line width=2pt]{\texttt{git push}} (origin); \onslide<6-8>{ % Remote branch \gitremotebranch [origmaster] {master} {right=of F} {F} } % Pull de Benoît \draw<8>[->,-Latex] (origin) to[out=0,in=90] node[midway,font=\scriptsize,above right]{\texttt{git pull}\quad \normalsize \fbox{Conflict?}} (historique de Benoit); % Push de Benoît \draw<9>[->,-Latex] (historique de Benoit) to[out=90,in=0] node[midway,font=\scriptsize,above right]{\texttt{git push}} (origin); \onslide<9-10>{ % Remote branch \gitremotebranch [origmaster] {master} {right=of H} {H} } % Pull de Chloé \draw<10>[->,-Latex] (origin) to[out=180,in=90] node[midway,font=\scriptsize,above left]{\texttt{git pull}} (historique de Chloe); #+END_EXPORT *** Footer :ignore: #+BEGIN_EXPORT latex \end{tikzpicture}} #+END_EXPORT ** À retenir - Collaborer = gérer un historique distribué\bigskip - Le serveur ne sert à rien: Alice et Bob pourraient échanger directement leurs historiques \bigskip # Git est complètemnet décentralisé, chacun a une copie complète de # tout l'historique du projet (et pas juste de la dernière # version...). - Chacun a tout l'historique $\leadsto$ très résilient ** Org-mode: how to modify an Item :noexport: https://emacs.stackexchange.com/questions/35976/how-to-change-the-appearance-of-list-bullets-in-latex-beamer-exports/35985#35985 - [@123] will set the counter of enumerations (or "ordered lists") to 123. - [$Rightarrow$] :: bla will generate a "description". Both do not really yield the flexibility that I was hoping for in my question, but it seems that this is as far as one can get. EDIT: I've stumbled over a not so obvious way to gain full flexiblity: - @@latex:[$\Rightarrow$]@@ will be exported as \item[$\Rightarrow$] Notice that @@beamer:[$\Rightarrow$]@@ does not effect this. ** La Démo :noexport: #+begin_src shell :results output :exports both cd /tmp/ git clone git@gitlab.inria.fr:learninglab/mooc-rr/mooc-rr-modele.git cd mooc-rr-modele sed -i 's/rebase = true/rebase = false/g' .git/config git reset --hard f186adfdddfd0986ab3af38187b8e5f949f9bcf3 # git reset --hard 64844e0894095f7a8cd9609218bcad3d9b4b24ea # 64844e0894095f7a8cd9609218bcad3d9b4b24ea git checkout master sed -i "s/= logmodel.predict/= logmodel.predict/" module2/exo5/exo5_python_fr.org git commit -a -m "Carelessly adding space" git pull jed module2/exo5/exo5_python_fr.org git status git add module2/exo5/exo5_python_fr.org git commit #+end_src ** Le conflit Au moment du pull, il se peut que le merge ne soit pas possible et qu'un conflit apparaisse. Pas de panique! # - Rien de grave, ne pas paniquer. Rien n'est perdu, tout est dans # votre historique local! #+BEGIN_CENTER \bf Démonstration !\pause #+END_CENTER - Git travaille à la granularité du fichier et de la ligne - @@latex:[$\Rightarrow$]@@ Modularisez autant que possible\pause - Il y aura conflit dans un fichier si la même ligne a été modifiée de chaque côté (même un espace) - @@latex:[$\Rightarrow$]@@ Ne réindentez pas votre texte pour rien! - @@latex:[$\Rightarrow$]@@ Faites des commits différents pour les modifications de fonds, de forme (git *status*; git *diff*; git *add*) - @@latex:[$\Rightarrow$]@@ Faites de *petits* commits *logiques* (+=git commit -a=+)\pause - Les fichier binaires n'ont pas de lignes... le diff et la fusion sont souvent impossibles - @@latex:[$\Rightarrow$]@@ Préférer le format texte ** En conclusion, git: #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{0cm}\vspace{-.3cm} \hfill\llap{% \includegraphics[height=3.8cm]{img_git/git_tree.png}% \hspace{-1cm} } \end{overlayarea}\vspace{-1\baselineskip} #+END_EXPORT #+LaTeX: \begin{minipage}[t]{.6\linewidth} - Ça versionne ! (git *log* / *hist*)\medskip - Ça facilite le travail collaboratif\newline (git *merge*) !\medskip - Ça permet de stocker ses modifications localement\newline (git *commit*) !\medskip #+LaTeX: \end{minipage} - Ça permet de partager ses modifications quand on le souhaite (git *pull/push*) !\medskip\pause Mais comment mettre ça en place ? - Comment avoir un serveur de backup ? - Comment gérer qui peut lire/écrire ? ** Crédits - Un grand remerciement à Benoît Vinot qui m'a fourni deux présentations en beamer + tikz déjà très proches de ce que je souhaitais présenter. - Merci à Vincent Danjean pour avoir repéré les nombreuses petites incohérences qui trainaient dans les noms de branches. * L'écosystème Git ** \large Les plates-formes de développement collaboratif \small (1/2) #+LaTeX: \begin{overlayarea}{\linewidth}{8cm} - GitHub, GitLab, et les autres! ::   - Hébergement gratuit de projets publics - Interfaces web (navigation, preview, édition en ligne) - Gestion des permissions (lecture/écriture, public/privé) et des utilisateurs\medskip\pause - Un réseau social des développeurs ::   - Statistiques, émulation, gestion de communauté - /Issues/, correction de bugs, revue de code\pause - Le /fork/ et la /pull request/\medskip #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{0cm}\vspace{-1.6cm} \hfill\llap{% \includegraphics<3>[height=3.6cm]{img_git/github_pull_request_1.pdf}% \includegraphics<4>[height=3.6cm]{img_git/github_pull_request_2.pdf}% \includegraphics<5>[height=3.6cm]{img_git/github_pull_request_3.pdf}% \hspace{-1cm} } \end{overlayarea}\vspace{-1\baselineskip}\pause\pause\pause #+END_EXPORT - Des tas de fonctionnalités incroyables ::  \hfill[\to MOOC RR avancé] - Intégration continue - Déversement vers des archives (Zenodo, SWH) #+LaTeX: \end{overlayarea} ** \large Les plates-formes de développement collaboratif \small (2/2) #+LaTeX: \begin{overlayarea}{\linewidth}{8cm} - GitHub, GitLab, et les autres! ::   - Hébergement _*gratuit*_ de projets publics ?!? \pause - Github :: Leaders du marché mais logiciel propriétaire - Projets privés: # #+LaTeX: \hfill\llap{\includegraphics[height=.5cm]{img_git/Logo_GitHub.pdf}\includegraphics[height=.9cm]{img_git/Octocat.jpg}\hspace{-1cm}} - gratuit pour étudiants/académiques - payant pour les autres #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{0cm} \vspace{-2.3cm}\hfill\llap{\includegraphics<2-3>[height=1.8cm]{img_git/github_interactions.pdf}} \end{overlayarea}\vspace{-1\baselineskip}\pause #+END_EXPORT - GitLab :: Logiciel libre, plusieurs instances - Instance =gitlab.com= similaire à GitHub - Compagnies, institutions: support avancé #+BEGIN_EXPORT latex \begin{overlayarea}{\linewidth}{0cm} \vspace{-.7cm}\centerline{\includegraphics<3>[height=1.8cm]{img_git/gitlab_interactions.pdf}} \end{overlayarea}\vspace{-1\baselineskip}\pause #+END_EXPORT - Lequel choisir ? :: (+ FramaGit, BitBucket, SourceForge, ...) - Visibilité/pérénité - Projets privés ou publiques - Confidentialité des données #+LaTeX: \end{overlayarea} ** Interfaces graphiques - JupyterLab-git - Rstudio - Emacs Magit\bigskip - GitHub Desktop - GitKraken - SmartGit ** Crédits - A cropped and rotated version of an image of Linus Torvalds speaking at the LinuxCon Europe 2014 in Düsseldorf. CC BY-SA 4.0. https://fr.wikipedia.org/wiki/Linus_Torvalds#/media/Fichier:LinuxCon_Europe_Linus_Torvalds_03_(cropped).jpg - Un grand remerciement à Benoît Vinot qui m'a fourni deux présentations en beamer + tikz déjà très proches de ce que je souhaitais présenter. ** Managing large files (dans le module de RR2) :noexport: - Refer to zenodo of figshare from the beginning - git annex and git lfs (deployed on github, bitbucket, and recent versions of gitlab) \hfill[\to MOOC RR advanced] - Push to Zenodo ? * Export png :noexport: #+begin_src shell :results output :exports both for i in `seq 1 69`; do pdftk diapos_git.pdf cat $i output diapos_git-$i.pdf inkscape --without-gui diapos_git-$i.pdf -e diapos_git-$i.png -d 285.8 done #+end_src #+RESULTS: #+begin_example DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-1.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-2.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-3.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-4.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-5.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-6.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-7.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-8.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-9.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-10.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-11.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-12.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-13.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-14.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-15.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-16.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-17.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-18.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-19.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-20.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-21.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-22.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-23.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-24.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-25.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-26.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-27.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-28.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-29.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-30.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-31.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-32.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-33.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-34.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-35.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-36.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-37.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-38.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-39.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-40.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-41.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-42.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-43.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-44.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-45.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-46.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-47.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-48.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-49.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-50.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-51.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-52.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-53.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-54.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-55.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-56.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-57.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-58.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-59.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-60.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-61.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-62.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-63.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-64.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-65.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-66.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-67.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-68.png DPI: 285.8 Background RRGGBBAA: ffffff00 Area 0:0:483.78:362.835 exported to 1440 x 1080 pixels (285.8 dpi) Bitmap saved as: diapos_git-69.png #+end_example #+begin_src shell :results output :exports both pdftoppm diapos_git.pdf diapos_git -png -r 285.6 #+end_src #+RESULTS: * Tikz :noexport: ** From the doc :noexport: #+BEGIN_EXPORT latex \scalebox{.8}{\begin{tikzpicture}[nodes={text height=.7em, text depth=.2em, draw=black!20, thick, fill=white, font=\footnotesize}, >=spaced stealth', rounded corners, semithick] \graph[layered layout, level distance=1cm, sibling sep=.5em, sibling distance=1cm] { "5th Edition" -> { "6th Edition", "PWB 1.0" }; "6th Edition" -> { "LSX" [>child anchor=45], "1 BSD", "Mini Unix", "Wollongong", "Interdata" }; "Interdata" -> { "Unix/TS 3.0", "PWB 2.0", "7th Edition" }; "7th Edition" -> { "8th Edition", "32V", "V7M", "Ultrix-11", "Xenix", "UniPlus+" }; "V7M" -> "Ultrix-11"; "8th Edition" -> "9th Edition"; "1 BSD" -> "2 BSD" -> "2.8 BSD" -> { "Ultrix-11", "2.9 BSD" }; "32V" -> "3 BSD" -> "4 BSD" -> "4.1 BSD" -> { "4.2 BSD", "2.8 BSD", "8th Edition" }; "4.2 BSD" -> { "4.3 BSD", "Ultrix-32" }; "PWB 1.0" -> { "PWB 1.2" -> "PWB 2.0", "USG 1.0" -> { "CB Unix 1", "USG 2.0" }}; "CB Unix 1" -> "CB Unix 2" -> "CB Unix 3" -> { "Unix/TS++", "PDP-11 Sys V" }; { "USG 2.0" -> "USG 3.0", "PWB 2.0", "Unix/TS 1.0" } -> "Unix/TS 3.0"; { "Unix/TS++", "CB Unix 3", "Unix/TS 3.0" } -> "TS 4.0" -> "System V.0" -> "System V.2" -> "System V.3"; }; \end{tikzpicture}} #+END_EXPORT ** Historiques #+BEGIN_EXPORT latex \centering \begin{tikzpicture} % Commit DAG \gitDAG[grow right sep = 2em]{ A -- B -- { C, D -- E, } }; % Tag reference \gittag [v0p1] % node name {v0.1} % node text {above=of A} % node placement {A} % target % Remote branch \gitremotebranch [origmaster] % node name {origin/master} % node text {above=of C} % node placement {C} % target % Branch \gitbranch {master} % node name and text {above=of E} % node placement {E} % target % HEAD reference \gitHEAD {above=of master} % node placement {master} % target \end{tikzpicture} \begin{tikzpicture} \gitDAG[grow right sep = 2em]{ A -- B -- { C -- D' -- E', {[nodes=unreachable] D -- E }, } }; % Tag reference \gittag [v0p1] % node name {v0.1} % node text {above=of A} % node placement {A} % target % Remote branch \gitremotebranch [origmaster] % node name {origin/master} % node text {above=of C} % node placement {C} % target % Branch \gitbranch {master} % node name and text {above=of E'} % node placement {E'} % target % HEAD reference \gitHEAD {above=of master} % node placement {master} % target \end{tikzpicture} #+END_EXPORT ** Historiques #+BEGIN_EXPORT latex \centering \begin{tikzpicture} % Commit DAG \gitDAG[grow up sep = 2em, branch right = 4em]{ A -- B -- { C \onslide<2>{,D -- E} } }; % Tag reference \gittag [v0p1] % node name {v0.1} % node text {right=of A} % node placement {A} % target % Remote branch \gitremotebranch [origmaster] % node name {origin/master} % node text {left=of C} % node placement {C} % target % Branch \onslide<2>{ \gitbranch {master} % node name and text {right=of E} % node placement {E} % target % HEAD reference \gitHEAD {right=of master} % node placement {master} % target } \end{tikzpicture} #+END_EXPORT ** Historiques # http://www.texample.net/media/tikz/examples/TEX/beamer-arrows.tex #+BEGIN_EXPORT latex \centering \begin{tikzpicture} % Commit DAG \gitDAG[grow up sep = 2em, branch right = 4em]{ "" -- A -- B -- C -- {[nodes=unreachable] D}; {[nodes=placeholder] "" -- NAA -- NBB -- NCC } --[draw opacity = 0,fill opacity = 0] E -- F; C -- E; }; % Tag reference \end{tikzpicture} #+END_EXPORT * Emacs Setup :noexport: This document has local variables in its postembule, which should allow Org-mode (9) to work seamlessly without any setup. If you're uncomfortable using such variables, you can safely ignore them at startup. Exporting may require that you copy them in your .emacs. # ############################### # Local Variables: # eval: (setq my-utils-file "ox-extra.el") # eval: (load-file (expand-file-name my-utils-file (file-name-directory (buffer-file-name)))) # eval: (ox-extras-activate '(ignore-headlines)) # End: