diff --git a/content/outils/scm/git/configuration/bash.tex b/content/outils/scm/git/commandes.tex similarity index 52% rename from content/outils/scm/git/configuration/bash.tex rename to content/outils/scm/git/commandes.tex index 2f5d5f8..71300d0 100644 --- a/content/outils/scm/git/configuration/bash.tex +++ b/content/outils/scm/git/commandes.tex @@ -1,4 +1,5 @@ \begin{frame} \frametitle{} + fichier content/outils/scm/git/commandes.tex à éditer % contenu (pas trop long) de la diapositive \end{frame} \ No newline at end of file diff --git a/content/outils/scm/git/commandes/add.tex b/content/outils/scm/git/commandes/add.tex index 2f5d5f8..02e4c1b 100644 --- a/content/outils/scm/git/commandes/add.tex +++ b/content/outils/scm/git/commandes/add.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{add} + \begin{description} + \item[\commande{git add}] Ajouter le contenu d'un fichier à l'index. + \end{description} + \skbinput[from=fig]{apps/git_commande_add} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-u}] ajout des modifications des fichiers déjà connus de git + \item[\commande{-i}] ajout interactif + \end{description} + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/commandes/blame.tex b/content/outils/scm/git/commandes/blame.tex index 2f5d5f8..372f93a 100644 --- a/content/outils/scm/git/commandes/blame.tex +++ b/content/outils/scm/git/commandes/blame.tex @@ -1,4 +1,7 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{blame} + \begin{description} + \item[\commande{git blame}] Afficher l'auteur et la référence de la dernière modification pour chaque ligne d'un fichier + \end{description} +\end{frame} diff --git a/content/outils/scm/git/commandes/branch.tex b/content/outils/scm/git/commandes/branch.tex index 2f5d5f8..6376131 100644 --- a/content/outils/scm/git/commandes/branch.tex +++ b/content/outils/scm/git/commandes/branch.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{branch} + \begin{description} + \item[git branch] Gérer les branches + \end{description} + + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--list}] Lister les branches (\commande{-a} les branches locales et distantes, \commande{-r} les branches distantes uniquement) + \item[\commande{-d}] Supprimer une branche + \end{description} + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/commandes/checkout.tex b/content/outils/scm/git/commandes/checkout.tex index 2f5d5f8..a2cc433 100644 --- a/content/outils/scm/git/commandes/checkout.tex +++ b/content/outils/scm/git/commandes/checkout.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{checkout} + \begin{description} + \item[\commande{git checkout}] Synchroniser le répertoire de travail avec une version + \end{description} + \skbinput[from=fig]{apps/git_commande_checkout} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-b}] Créer une nouvelle branche et déplacer HEAD dessus + \item[\commande{--ours --theirs}] Conserver des modifications explicitement + \end{description} + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/commandes/cherry-pick.tex b/content/outils/scm/git/commandes/cherry-pick.tex index 2f5d5f8..441e0e4 100644 --- a/content/outils/scm/git/commandes/cherry-pick.tex +++ b/content/outils/scm/git/commandes/cherry-pick.tex @@ -1,4 +1,13 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{cherry-pick} + \begin{description} + \item[\commande{git cherry-pick}] Appliquer les changements introduits dans un commit donné + \end{description} + \skbinput[from=fig]{apps/git_commande_cherry-pick} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--abort}] Interrompre le processus + \end{description} + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/commandes/cherry.tex b/content/outils/scm/git/commandes/cherry.tex index 2f5d5f8..8980fbb 100644 --- a/content/outils/scm/git/commandes/cherry.tex +++ b/content/outils/scm/git/commandes/cherry.tex @@ -1,4 +1,7 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{cherry} + \begin{description} + \item[\commande{git cherry}] Trouver les commit qui ne sont pas encore appliqués dans le dépôt distant + \end{description} +\end{frame} diff --git a/content/outils/scm/git/commandes/clean.tex b/content/outils/scm/git/commandes/clean.tex index 2f5d5f8..457d96f 100644 --- a/content/outils/scm/git/commandes/clean.tex +++ b/content/outils/scm/git/commandes/clean.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{clean} + \begin{description} + \item[\commande{git clean}] Supprime les fichiers non suivis du répertoire de travail + \end{description} + \skbinput[from=fig]{apps/git_commande_clean} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-xdf}] Combinaison pour supprimer du répertoire de travail les dossiers et fichiers non suivis + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/clone.tex b/content/outils/scm/git/commandes/clone.tex index 2f5d5f8..e860fec 100644 --- a/content/outils/scm/git/commandes/clone.tex +++ b/content/outils/scm/git/commandes/clone.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{clone} + \begin{description} + \item[\commande{git clone }] Récupérer un dépôt git depuis une source distante + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/commit.tex b/content/outils/scm/git/commandes/commit.tex index 2f5d5f8..31ac682 100644 --- a/content/outils/scm/git/commandes/commit.tex +++ b/content/outils/scm/git/commandes/commit.tex @@ -1,4 +1,15 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{commit} + \begin{description} + \item[\commande{git commit}] Créer un commit à partir du contenu de l'index + \end{description} + \skbinput[from=fig]{apps/git_commande_commit} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-a}] Court-circuiter l'index en intégrant au commit les modifications des fichiers suivis dans le répertoire de travail + \item[\commande{--amend}] Modifier le dernier commit + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/diff.tex b/content/outils/scm/git/commandes/diff.tex index 2f5d5f8..938b8cb 100644 --- a/content/outils/scm/git/commandes/diff.tex +++ b/content/outils/scm/git/commandes/diff.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{diff} + \begin{description} + \item[\commande{git diff}] Afficher la différence entre deux états (entre le répertoire de travail ou l'index et la branche ou entre + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/fetch.tex b/content/outils/scm/git/commandes/fetch.tex index 2f5d5f8..513c754 100644 --- a/content/outils/scm/git/commandes/fetch.tex +++ b/content/outils/scm/git/commandes/fetch.tex @@ -1,4 +1,13 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Commandes git} + \framesubtitle{checkout} + \begin{description} + \item[git fetch] Mettre à jour la copie locale d'un dépôt distant + \end{description} + \skbinput[from=fig]{apps/git_commande_fetch} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[-all] Mettre à jour les copies locales de tous les dépôts distants configurés + \end{description} + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/commandes/init.tex b/content/outils/scm/git/commandes/init.tex index 2f5d5f8..6e67682 100644 --- a/content/outils/scm/git/commandes/init.tex +++ b/content/outils/scm/git/commandes/init.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{init} + \begin{description} + \item[\commande{git init}] Convertir le dossier courant en dépôt git + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/log.tex b/content/outils/scm/git/commandes/log.tex index 2f5d5f8..638ce29 100644 --- a/content/outils/scm/git/commandes/log.tex +++ b/content/outils/scm/git/commandes/log.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{log} + \begin{description} + \item[\commande{git log}] Afficher une liste de commits + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/merge.tex b/content/outils/scm/git/commandes/merge.tex index 2f5d5f8..e1e8bbc 100644 --- a/content/outils/scm/git/commandes/merge.tex +++ b/content/outils/scm/git/commandes/merge.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{merge} + \begin{description} + \item[\commande{git merge}] Intégrer les commits d'une branche à une autre + \end{description} + \skbinput[from=fig]{apps/git_commande_merge} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--abort}] Pour faire machine arrière lors d'un merge manuel + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/pull.tex b/content/outils/scm/git/commandes/pull.tex index 2f5d5f8..cdddbbf 100644 --- a/content/outils/scm/git/commandes/pull.tex +++ b/content/outils/scm/git/commandes/pull.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{pull} + \begin{description} + \item[\commande{git pull}] Synchroniser une branche locale avec la branche distante + \end{description} + \skbinput[from=fig]{apps/git_commande_pull} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--rebase}] Choisir la stratégie rebase pour incorporer les changements (équivalent à la succession des commandes \commande{fetch} et \commande{rebase} + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/push.tex b/content/outils/scm/git/commandes/push.tex index 2f5d5f8..c8e7df1 100644 --- a/content/outils/scm/git/commandes/push.tex +++ b/content/outils/scm/git/commandes/push.tex @@ -1,4 +1,15 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{push} + \begin{description} + \item[\commande{git push}] Synchroniser une branche distante avec une branche locale + \end{description} + \skbinput[from=fig]{apps/git_commande_push} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--tags}] Pousser les tags locaux sur le dépôt distant + \item[\commande{--all}] Pousser toutes les branches + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/rebase.tex b/content/outils/scm/git/commandes/rebase.tex index 2f5d5f8..319a223 100644 --- a/content/outils/scm/git/commandes/rebase.tex +++ b/content/outils/scm/git/commandes/rebase.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{rebase} + \begin{description} + \item[\commande{git rebase}] Rejouer les modifications après mise à jour de la branche + \end{description} + \skbinput[from=fig]{apps/git_commande_rebase} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-i}] Réordonner les modifications manuellement + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/reset.tex b/content/outils/scm/git/commandes/reset.tex index 2f5d5f8..8e0e711 100644 --- a/content/outils/scm/git/commandes/reset.tex +++ b/content/outils/scm/git/commandes/reset.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{reset} + \begin{description} + \item[\commande{git reset}] Revenir à une version antérieure + \end{description} + \skbinput[from=fig]{apps/git_commande_reset} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--hard}] Écraser le contenu du répertoire de travail et de l'index + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/revert.tex b/content/outils/scm/git/commandes/revert.tex index 2f5d5f8..5ddee92 100644 --- a/content/outils/scm/git/commandes/revert.tex +++ b/content/outils/scm/git/commandes/revert.tex @@ -1,4 +1,14 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{revert} + \begin{description} + \item[\commande{git revert}] Créer le commit annulant un autre commit + \end{description} + \skbinput[from=fig]{apps/git_commande_revert} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{--abort}] Interrompre le traitement + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/show.tex b/content/outils/scm/git/commandes/show.tex index 2f5d5f8..b248510 100644 --- a/content/outils/scm/git/commandes/show.tex +++ b/content/outils/scm/git/commandes/show.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{show} + \begin{description} + \item[\commande{git show}] Afficher la description d'un commit + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/status.tex b/content/outils/scm/git/commandes/status.tex index 2f5d5f8..ba6c75a 100644 --- a/content/outils/scm/git/commandes/status.tex +++ b/content/outils/scm/git/commandes/status.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{status} + \begin{description} + \item[\commande{git status}] Afficher le statut du répertoire de travail, et de l'index relativement à la branche + \end{description} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/commandes/tag.tex b/content/outils/scm/git/commandes/tag.tex index 2f5d5f8..fe5c42b 100644 --- a/content/outils/scm/git/commandes/tag.tex +++ b/content/outils/scm/git/commandes/tag.tex @@ -1,4 +1,15 @@ \begin{frame} - \frametitle{} + \frametitle{Commandes git} + \framesubtitle{tag} + \begin{description} + \item[\commande{git tag}] Gérer les étiquettes attachées à un commit + \end{description} + \begin{exampleblock}{Options à retenir} + \begin{description} + \item[\commande{-l}] Lister les étiquettes (éventuellement correpondant à un motif) + \item[\commande{-a}] Annoter l'étiquette + \item[\commande{-s}] Signer l'étiquette + \end{description} + \end{exampleblock} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/configuration/alias.tex b/content/outils/scm/git/configuration/alias.tex index e69de29..7c40551 100644 --- a/content/outils/scm/git/configuration/alias.tex +++ b/content/outils/scm/git/configuration/alias.tex @@ -0,0 +1,33 @@ +\begin{frame} +\frametitle{Ergonomie} +\framesubtitle{alias} +Les alias sont des raccourcis gérés pas git. + +\commande{git config alias. ""} + +\begin{exampleblock}{Nature des commandes} +Les commandes peuvent aussi bien être des options et sous-commandes de git que des commandes externes accessibles au shell. +\end{exampleblock} +\end{frame} + +\begin{frame}[fragile] +\frametitle {Ergonomie} +\framesubtitle{Exemples d'alias} +\begin{minted}[fontsize=\tiny]{ini} +[alias] + co = checkout + st = status + fe = fetch + lo = log --oneline + re = reset --hard HEAD~1 + br = branch + mnf = merge --no-ff + sw = checkout @{-1} + lu = log ..@{upstream} + luo = log --oneline ..@{upstream} + ul=log @{upstream}..HEAD + ulo=log --oneline @{upstream}..HEAD + cslt = !git describe --long --first-parent | awk -F'/' '{print $NF}' | awk -F'-' '{print $(NF-1)}' + clf = !git lo --no-merges $(git lo -1 --pretty=format:"%h" debian/changelog).. +\end{minted} +\end{frame} diff --git a/content/outils/scm/git/configuration/editeur.tex b/content/outils/scm/git/configuration/editeur.tex index 2f5d5f8..11b5c28 100644 --- a/content/outils/scm/git/configuration/editeur.tex +++ b/content/outils/scm/git/configuration/editeur.tex @@ -1,4 +1,10 @@ \begin{frame} - \frametitle{} + \frametitle{Ergonomie} + \framesubtitle{Interface} + \begin{itemize} + \item \commande{git config --global core.editor "vim"} + \item \commande{git config --global core.pager "less"} + \item \commande{git config --global color.ui auto} + \end{itemize} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} diff --git a/content/outils/scm/git/configuration/hooks.tex b/content/outils/scm/git/configuration/hooks.tex new file mode 100644 index 0000000..e29a674 --- /dev/null +++ b/content/outils/scm/git/configuration/hooks.tex @@ -0,0 +1,47 @@ +\begin{frame} + \frametitle{Ergonomie} + \framesubtitle{Hooks} + Les hooks sont des actions déclenchées par des évènements concernant le dépôt git. + \begin{exampleblock}{} + Les hooks sont des scripts exécutables (pas de langage imposé) posés dans le dossier .git/hooks. + \end{exampleblock} + +\end{frame} +\begin{frame} + \frametitle{Ergonomie} + \framesubtitle{Hooks pour le client} + \begin{columns} + \begin{column}{0.5\textwidth} + \begin{itemize} + \item pre-commit + \item prepare-commit-msg + \item commit-msg + \item post-commit + + \item applypatch-msg + \item preapply-patch + \item postapply-patch + \end{itemize} + +\end{column} +\begin{column}{0.5\textwidth} + \begin{itemize} + \item pre-rebase + \item post-rewrite + \item post-checkout + \item post-merge + \item pre-push + \end{itemize} +\end{column} +\end{columns} +\end{frame} + +\begin{frame} + \frametitle{Ergonomie} + \framesubtitle{Hooks pour le serveur} + \begin{itemize} + \item pre-receive + \item update + \item post-receive + \end{itemize} +\end{frame} diff --git a/content/outils/scm/git/configuration/shell.tex b/content/outils/scm/git/configuration/shell.tex new file mode 100644 index 0000000..b3d6db4 --- /dev/null +++ b/content/outils/scm/git/configuration/shell.tex @@ -0,0 +1,16 @@ +\begin{frame}[fragile] + \frametitle{Ergonomie} + \framesubtitle{bash} + \begin{minted}{bash} + source ~/.git-prompt.sh + GIT_PS1_SHOWDIRTYSTATE=1 + GIT_PS1_SHOWSTASHSTATE=1 + GIT_PS1_SHOWUNTRACKEDFILES=1 + GIT_PS1_SHOWUPSTREAM="auto" + PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' + \end{minted} + \begin{exampleblock}{git-prompt} + git-prompt.sh est un script définissant la fonction \_\_git\_ps1 permettant d'afficher des informations pertinentes sur l'état du dépôt git dans l'invite de commande. + \end{exampleblock} + % contenu (pas trop long) de la diapositive +\end{frame} diff --git a/content/outils/scm/git/configuration/user.tex b/content/outils/scm/git/configuration/user.tex index d30c7b6..354aaee 100644 --- a/content/outils/scm/git/configuration/user.tex +++ b/content/outils/scm/git/configuration/user.tex @@ -3,7 +3,7 @@ \framesubtitle{Identifier l'utilisateur} git associe à chaque commit des informations sur la personne ayant commité et sur la personne ayant mergé le commit. \begin{itemize} -\item git config --global user.name "" -\item git config --global user.email "" + \item \commande{git config --global user.name ""} + \item \commande{git config --global user.email ""} \end{itemize} \end{frame} diff --git a/content/outils/scm/git/exercices/exercice_01.tex b/content/outils/scm/git/exercices/exercice_01.tex index d69121e..4611964 100644 --- a/content/outils/scm/git/exercices/exercice_01.tex +++ b/content/outils/scm/git/exercices/exercice_01.tex @@ -1,8 +1,10 @@ \begin{frame} -\frametitle{exercice} +\frametitle{Exercices} \framesubtitle{Configuration globale de git} -Les paramètres de l'application git peuvent être globaux où propres à un dépôt. +Les paramètres de l'application git peuvent être globaux ou propres à un dépôt. L'ergonomie, l'identité, les alias sont souvent les mêmes pour tous les dépôts. La première étape consiste généralement à renseigner ces paramètres. + +Le premier exercice consiste donc à renseigner un minimum de ces variables globales. \end{frame} diff --git a/content/outils/scm/git/exercices/exercice_01/steps.tex b/content/outils/scm/git/exercices/exercice_01/steps.tex index 2f5d5f8..2561c76 100644 --- a/content/outils/scm/git/exercices/exercice_01/steps.tex +++ b/content/outils/scm/git/exercices/exercice_01/steps.tex @@ -1,4 +1,38 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Mise en place} + \framesubtitle{Identité de l'utilisateur} + \begin{itemize} + \item \commande{git config --global user.name ""} + \item \commande{git config --global user.email ""} + \end{itemize} + \begin{exampleblock}{En cas d'oubli} + \commande{git} émet un avertissement lors du premier commit si ces variables ne sont pas renseignées. + Il est possible de corriger cet oubli facilement si les commits n'ont pas encore été partagés. + \end{exampleblock} +\end{frame} + +\begin{frame} + \frametitle{Mise en place} + \framesubtitle{Ergonomie} + \begin{itemize} + \item \commande{git config --global color.ui auto} + \item \commande{git config --global core.editor "<éditeur de texte à utiliser>"} + \item \commande{git config --global core.pager ""} + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Mise en place} + \framesubtitle{Ergonomie (GNU/Linux)} + \begin{minted}{bash} + source ~/.git-prompt.sh + GIT_PS1_SHOWDIRTYSTATE=1 + GIT_PS1_SHOWSTASHSTATE=1 + GIT_PS1_SHOWUNTRACKEDFILES=1 + GIT_PS1_SHOWUPSTREAM="auto" + PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' + \end{minted} + \begin{exampleblock}{git-prompt} + git-prompt.sh est un script définissant la fonction \_\_git\_ps1 permettant d'afficher des informations pertinentes sur l'état du dépôt git dans l'invite de commande. + \end{exampleblock} +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_02.tex b/content/outils/scm/git/exercices/exercice_02.tex index 2f5d5f8..0b40f7b 100644 --- a/content/outils/scm/git/exercices/exercice_02.tex +++ b/content/outils/scm/git/exercices/exercice_02.tex @@ -1,4 +1,13 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Exercices} + \framesubtitle{Initialiser un dépôt} + Un dépôt git peut être amorcé de différentes façons selon le contexte. + \begin{itemize} + \item le dépôt existe déjà en \emph{distant} : + \begin{itemize} + \item le dépôt distant est déjà au format git ; + \item le dépôt distant est géré par un autre scm ; + \end{itemize} + \item un répertoire local doit être converti en dépôt git ; + \end{itemize} +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_02/steps.tex b/content/outils/scm/git/exercices/exercice_02/steps.tex index 2f5d5f8..5b85c4d 100644 --- a/content/outils/scm/git/exercices/exercice_02/steps.tex +++ b/content/outils/scm/git/exercices/exercice_02/steps.tex @@ -1,4 +1,21 @@ \begin{frame} - \frametitle{} + \frametitle{Initialiser le dépôt} + \framesubtitle{Récupérer le dépôt git distant en ssh} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\end{frame} +\begin{frame} + \frametitle{Initialiser le dépôt} + \framesubtitle{Récupérer le dépôt git distant en https} + % contenu (pas trop long) de la diapositive +\end{frame} +\begin{frame} + \frametitle{Initialiser le dépôt} + \framesubtitle{Récupérer le dépôt CVS distant} + % contenu (pas trop long) de la diapositive +\end{frame} + +\begin{frame} + \frametitle{Initialiser le dépôt} + \framesubtitle{Convertir le dossier local en dépôt git} + % contenu (pas trop long) de la diapositive +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_03.tex b/content/outils/scm/git/exercices/exercice_03.tex index 2f5d5f8..3400ac1 100644 --- a/content/outils/scm/git/exercices/exercice_03.tex +++ b/content/outils/scm/git/exercices/exercice_03.tex @@ -1,4 +1,9 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Exercice} + \framesubtitle{Avoir des dépôts distants en référence} + Les dépôts distants sont un aspect important du fonctionnement d'un SCM décentralisé. + + git permet d'associer plusieurs dépôts distants à un dépôt local et de renseigner à quelle branche de quel dépôt distant une branche locale doit se référer. + + Le présent exercice aborde la mise en place de tels liens entre branches locales et branches distantes. +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_03/steps.tex b/content/outils/scm/git/exercices/exercice_03/steps.tex index 2f5d5f8..f13fec2 100644 --- a/content/outils/scm/git/exercices/exercice_03/steps.tex +++ b/content/outils/scm/git/exercices/exercice_03/steps.tex @@ -1,4 +1,31 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Associer les dépôts distants} + \framesubtitle{Ajouter un dépôt distant} + \commande{git remote add ://[@][:port]/} + + Exemples : + \begin{itemize} + \item \commande{git remote add formation ssh://gogs@localhost/bbohard.git} + \item \commande{git remote add formation https://gogs@localhost/bbohard.git} + \end{itemize} + \begin{exampleblock}{Vérification} + Les dépôts distants configurés peuvent être listés avec : + \begin{itemize} + \item \commande{git remote} pour la version sobre ou + \item \commande{git remote -v} pour plus de détails. + \end{itemize} + \end{exampleblock} +\end{frame} + +\begin{frame} + \frametitle{Associer les dépôts distants} + \framesubtitle{Observer une branche distante} + Pour une branche distante existante : + \begin{itemize} + \item \commande{git branch --set-upstream-to=/} + \end{itemize} + Pour une branche distante inexistante : + \begin{itemize} + \item \commande{git push --set-upstream } + \end{itemize} +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_04.tex b/content/outils/scm/git/exercices/exercice_04.tex index 2f5d5f8..394fdb1 100644 --- a/content/outils/scm/git/exercices/exercice_04.tex +++ b/content/outils/scm/git/exercices/exercice_04.tex @@ -1,4 +1,7 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Exercice} + \framesubtitle{Premier commit} + Le premier commit est toujours le plus facile. Pas de conflit à attendre, pas stress… + + Cet exercice permet de décortiquer le fonctionnement des \emph{arbres} de git avec l'ajout d'un simple fichier dans un dossier. +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_04/steps.tex b/content/outils/scm/git/exercices/exercice_04/steps.tex index 2f5d5f8..0911a8b 100644 --- a/content/outils/scm/git/exercices/exercice_04/steps.tex +++ b/content/outils/scm/git/exercices/exercice_04/steps.tex @@ -1,4 +1,133 @@ +\begin{frame}[fragile] + \frametitle{Premier pas} + \framesubtitle{Dépôt vide} + Au démarrage, est un dépôt vide : + + \begin{minted}[fontsize=\tiny]{bash} + Sur la branche master + + Validation initiale + + rien à valider (créez/copiez des fichiers et utilisez "git add" pour les suivre) + \end{minted} +\end{frame} +\begin{frame}[fragile] + \frametitle{Premier pas} + \framesubtitle{Et pourtant…} +\begin{columns} +\begin{column}{0.5\textwidth} + L'initialisation consiste en la création du dossier .git : +\end{column} +\begin{column}{0.5\textwidth} + \begin{minted}[fontsize=\tiny]{bash} +. +└── .git + ├── branches + ├── config + ├── description + ├── HEAD + ├── hooks + │   ├── applypatch-msg.sample + │   ├── commit-msg.sample + │   ├── post-update.sample + │   ├── pre-applypatch.sample + │   ├── pre-commit.sample + │   ├── prepare-commit-msg.sample + │   ├── pre-push.sample + │   ├── pre-rebase.sample + │   └── update.sample + ├── info + │   └── exclude + ├── objects + │   ├── info + │   └── pack + └── refs + ├── heads + └── tags +\end{minted} +\end{column} +\end{columns} +\end{frame} + \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file +\frametitle{Premier pas} +\framesubtitle{Création d'un dossier} +\commande{mkdir doc} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Premier pas} +\framesubtitle{Création d'un dossier} +\commande{git status} +\begin{minted}[fontsize=\tiny]{bash} +Sur la branche master + +Validation initiale + +rien à valider (créez/copiez des fichiers et utilisez "git add" pour les suivre) +\end{minted} +\begin{exampleblock}{} + git ne prend en considération que le contenu des fichiers. +\end{exampleblock} +\end{frame} + +\begin{frame} +\frametitle{Premier pas} +\framesubtitle{Création d'un fichier} +\commande{touch doc/README} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Premier pas} +\framesubtitle{Création d'un fichier} +\commande{git status} +\begin{minted}[fontsize=\tiny]{bash} +Sur la branche master + +Validation initiale + +Fichiers non suivis: + (utilisez "git add ..." pour inclure dans ce qui sera validé) + + doc/ + +aucune modification ajoutée à la validation mais des fichiers non suivis sont présents +(utilisez "git add" pour les suivre) +\end{minted} +\end{frame} + +\begin{frame} +\frametitle{Premier pas} +\framesubtitle{Création d'un fichier} +\commande{git add .} +\skbinput[from=fig]{apps/git_trees} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Premier pas} +\framesubtitle{Création d'un fichier} +\commande{git status} +\begin{minted}[fontsize=\tiny]{bash} +Sur la branche master + +Validation initiale + +Modifications qui seront validées : + (utilisez "git rm --cached ..." pour désindexer) + + nouveau fichier : doc/README + +\end{minted} +\end{frame} + +\begin{frame} +\commande{git commit -m "Ajout du premier fichier."} +\end{frame} + +\begin{frame}[fragile] +\commande{git status} +\begin{minted}[fontsize=\tiny]{bash} +Sur la branche master +rien à valider, la copie de travail est propre +\end{minted} +\end{frame} diff --git a/content/outils/scm/git/exercices/exercice_06/steps.tex b/content/outils/scm/git/exercices/exercice_06/steps.tex index 2f5d5f8..e2c6349 100644 --- a/content/outils/scm/git/exercices/exercice_06/steps.tex +++ b/content/outils/scm/git/exercices/exercice_06/steps.tex @@ -1,4 +1,65 @@ \begin{frame} \frametitle{} % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + % contenu (pas trop long) de la diapositive + \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 + \SAandWT + \end{tikzpicture} +\end{frame} diff --git a/content/outils/scm/git/presentation.tex b/content/outils/scm/git/presentation.tex index 0562eab..fe5b6eb 100644 --- a/content/outils/scm/git/presentation.tex +++ b/content/outils/scm/git/presentation.tex @@ -2,6 +2,7 @@ \frametitle{Git en un mot} \begin{itemize} \item projet créé en 2005 +\item sous licence GPLv2 \item gère le code source du noyau linux \item est multiplateforme \end{itemize} diff --git a/content/outils/scm/git/references/references.tex b/content/outils/scm/git/references/references.tex index e69de29..dfc47e9 100644 --- a/content/outils/scm/git/references/references.tex +++ b/content/outils/scm/git/references/references.tex @@ -0,0 +1,8 @@ +\begin{frame} +\frametitle{Références} +\begin{itemize} +\item \url{http://www.git-scm.com/docs} +\item Pro-git, S. Chacon et B. Straub, Apress, 2014 +\item les pages de man : gitcore-tutorial, gitworkflows, gitcvs-migration +\end{itemize} +\end{frame} diff --git a/content/outils/scm/git/stockage.tex b/content/outils/scm/git/stockage.tex index cf74bc4..40f71eb 100644 --- a/content/outils/scm/git/stockage.tex +++ b/content/outils/scm/git/stockage.tex @@ -1,4 +1,11 @@ \begin{frame} -\frametitle{Ce que sont les données pour git} -Un état du répertoire = un instantané de l'état des fichiers +\frametitle{Ce que cache le dépôt git} +\begin{description}[répertoire de travail] + \item[.git]<1-> Les objets et la configuration locale du dépôt git + \item[répertoire de travail]<2-> Une arborescence de fichiers accessible à l'édition, le bac à sable + \item[index]<3-> Les changements candidats à l'archivage + \item[HEAD]<4-> Le dernier état archivé + \item[stash]<5-> Une zone tampon pour les modifications à mettre momentanément de côté + \end{description} + \skbinput[from=fig]{apps/git_trees} \end{frame} diff --git a/content/outils/scm/git/web/basicssh.tex b/content/outils/scm/git/web/basicssh.tex new file mode 100644 index 0000000..c0b15ea --- /dev/null +++ b/content/outils/scm/git/web/basicssh.tex @@ -0,0 +1,5 @@ +\begin{frame} + \frametitle{} + fichier content/outils/scm/git/web/basicssh.tex à éditer + % contenu (pas trop long) de la diapositive +\end{frame} \ No newline at end of file diff --git a/content/outils/scm/git/web/gitlab.tex b/content/outils/scm/git/web/gitlab.tex index 2f5d5f8..869aaa7 100644 --- a/content/outils/scm/git/web/gitlab.tex +++ b/content/outils/scm/git/web/gitlab.tex @@ -1,4 +1,9 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Serveur de dépôts git} + \framesubtitle{GitLab} + Application combinant un serveur de dépôts git avec une interface web conviviale. + \begin{itemize} + \item Ruby + \item + \end{itemize} +\end{frame} diff --git a/content/outils/scm/git/web/gitolite.tex b/content/outils/scm/git/web/gitolite.tex new file mode 100644 index 0000000..1be4785 --- /dev/null +++ b/content/outils/scm/git/web/gitolite.tex @@ -0,0 +1,5 @@ +\begin{frame} + \frametitle{} + fichier content/outils/scm/git/web/gitolite.tex à éditer + % contenu (pas trop long) de la diapositive +\end{frame} \ No newline at end of file diff --git a/content/outils/scm/workflow/branching.tex b/content/outils/scm/workflow/branching.tex index 2f5d5f8..03cce08 100644 --- a/content/outils/scm/workflow/branching.tex +++ b/content/outils/scm/workflow/branching.tex @@ -1,4 +1,8 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Des branches pour étayer le tronc} + \begin{itemize} + \item maintenir l'histoire du code lisible + \item faciliter les divergences + \item éphémères ou pérennes + \end{itemize} +\end{frame} diff --git a/content/outils/scm/workflow/driessen/schema.tex b/content/outils/scm/workflow/driessen/schema.tex index 2f5d5f8..48353c0 100644 --- a/content/outils/scm/workflow/driessen/schema.tex +++ b/content/outils/scm/workflow/driessen/schema.tex @@ -1,4 +1,15 @@ \begin{frame} - \frametitle{} - % contenu (pas trop long) de la diapositive -\end{frame} \ No newline at end of file + \frametitle{Processus de Vincent Driessen} + \begin{columns} + \begin{column}{0.5\textwidth} + \begin{itemize} + \item Des branches \emph{master} et \emph{develop} pour le code fonctionnel + \item Des branches pour les développements en cours + \item Un circuit entre les branches bien fléché + \end{itemize} + \end{column} + \begin{column}{0.5\textwidth} + \skbfigure[center, figure, caption=Vincent Driessen CC-by-sa, height=0.5\textheight]{scm/git-model@2x.png} + \end{column} + \end{columns} +\end{frame} diff --git a/figures/apps/git_commande_add.tex b/figures/apps/git_commande_add.tex new file mode 100644 index 0000000..349af5b --- /dev/null +++ b/figures/apps/git_commande_add.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (155,37.5) node[white] {add} + (130,37.5) + -- (125,32) + -- (180,32) + -- (185,37.5) + -- (180,43) + -- (125,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_checkout.tex b/figures/apps/git_commande_checkout.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_checkout.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_cherry-pick.tex b/figures/apps/git_commande_cherry-pick.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_cherry-pick.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_clean.tex b/figures/apps/git_commande_clean.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_clean.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_commit.tex b/figures/apps/git_commande_commit.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_commit.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_fetch.tex b/figures/apps/git_commande_fetch.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_fetch.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_merge.tex b/figures/apps/git_commande_merge.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_merge.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_pull.tex b/figures/apps/git_commande_pull.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_pull.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_push.tex b/figures/apps/git_commande_push.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_push.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_rebase.tex b/figures/apps/git_commande_rebase.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_rebase.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_reset.tex b/figures/apps/git_commande_reset.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_reset.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_commande_revert.tex b/figures/apps/git_commande_revert.tex new file mode 100644 index 0000000..fdceb66 --- /dev/null +++ b/figures/apps/git_commande_revert.tex @@ -0,0 +1,60 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; +\path[color=black,draw=black,fill=black] + (185,37.5) node[white] {checkout} + (240,37.5) % creux + -- (245,32) + -- (130,32) + -- (125,37.5) + -- (130,43) + -- (245,43) + -- cycle; + +\end{tikzpicture} diff --git a/figures/apps/git_trees.svg b/figures/apps/git_trees.svg new file mode 100644 index 0000000..9092c19 --- /dev/null +++ b/figures/apps/git_trees.svg @@ -0,0 +1,275 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + HEAD + Index + WD + Pile + + + + + + + + + Remote + + + add + * + + + < + > + = + % + + diff --git a/figures/apps/git_trees.tex b/figures/apps/git_trees.tex new file mode 100644 index 0000000..e6de6e5 --- /dev/null +++ b/figures/apps/git_trees.tex @@ -0,0 +1,51 @@ + +\definecolor{stashcolor}{RGB}{248,249,156} +\definecolor{wdcolor}{RGB}{21,222,103} +\definecolor{indexcolor}{RGB}{19,206,204} +\definecolor{headcolor}{RGB}{29,162,232} +\definecolor{remote1color}{RGB}{222,208,212} +\definecolor{remote2color}{RGB}{217,151,175} +\definecolor{remote3color}{RGB}{220,98,143} +\definecolor{remote4color}{RGB}{229,20,96} + + +\begin{tikzpicture}[y=1pt, x=1pt, yscale=-0.500000, xscale=1.000000, inner sep=0pt, outer sep=0pt] +\path<5->[color=black,draw=black,fill=stashcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (65,0) node[below=3pt] {Stash} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path<2->[color=black,draw=black,fill=wdcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (125,0) node[below=3pt] {WD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path<3->[color=black,draw=black,fill=indexcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (185,0) node[below=3pt] {Index} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path<4->[color=black,draw=black,fill=headcolor,line join=round,line cap=round,miter + limit=4.00,line width=1.440pt,rounded corners=0.2000cm] + (245,0) node[below=3pt] {HEAD} + -- ++(25,0) + -- ++(0,75) + -- ++(-50,0) + -- ++(0,-75) + --cycle; +\path<6> + (325,50) node[anchor=base,fill=remote1color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote2color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote3color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {} + ++(-5,-10) node[anchor=base,fill=remote4color,shape=rectangle,draw,minimum width=50pt,minimum height=20pt,rounded corners=0.2cm] {Remote}; + +\end{tikzpicture} diff --git a/figures/cadoles/gray_frame_background.png b/figures/cadoles/gray_frame_background.png new file mode 100644 index 0000000..cbd7aed Binary files /dev/null and b/figures/cadoles/gray_frame_background.png differ diff --git a/figures/cadoles/gray_frame_header.svg b/figures/cadoles/gray_frame_header.svg new file mode 100644 index 0000000..a15b0ce --- /dev/null +++ b/figures/cadoles/gray_frame_header.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figures/scm/git-model@2x.png b/figures/scm/git-model@2x.png new file mode 100644 index 0000000..5b96426 Binary files /dev/null and b/figures/scm/git-model@2x.png differ diff --git a/presentations/outils/git/formation_git.tex b/presentations/outils/git/formation_git.tex index 8749fe2..e4ad517 100644 --- a/presentations/outils/git/formation_git.tex +++ b/presentations/outils/git/formation_git.tex @@ -19,7 +19,9 @@ \usepackage{xcolor} \usepackage{hyperref} \usepackage{hyperxmp} +\usepackage{minted} \usepackage{tikz} +\usepackage{gitdags} %\usepackage{pstricks} %\usepackage{pst-3d,pst-coil,pst-eps,pst-fill,pst-grad,pst-node,pst-plot,pst-text,pst-tree} @@ -56,10 +58,12 @@ \setbeamertemplate{background} {\skbinput[from=fig]{cadoles/gray_frame_background}} +\newcommand{\commande}[1]{\texttt{#1}} + \title[]{Formation Git} \subtitle{Oberthur Cash Protection} -\author[Equipe Auteur]{Cadoles} +\author[Equipe Auteur]{Benjamin Bohard} \institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}} @@ -90,12 +94,10 @@ \begin{document} \skbinput[from=rep]{style/title} -\begin{frame} - \frametitle{Plan} - \tableofcontents[part=1, pausesections] -\end{frame} \part{Fondamentaux} +\frame{\partpage} +\frame{\tableofcontents[part=1]} \section{Qu'attendre d'un SCM ?} \skbinput[from=rep]{outils/scm/definition} \skbinput[from=rep]{outils/scm/fonctionnalites_attendues} @@ -107,41 +109,44 @@ \skbinput[from=rep]{outils/scm/workflow/branching} \skbinput[from=rep]{outils/scm/workflow/driessen} \skbinput[from=rep]{outils/scm/workflow/driessen/schema} -\part{Pratique} +\skbinput[from=rep]{commun/questions} +\part{Préparation} +\frame{\partpage} \section{Installation} \subsection{Côté \emph{client}} \skbinput[from=rep]{outils/scm/git/installation/windows} \skbinput[from=rep]{outils/scm/git/installation/macos} \skbinput[from=rep]{outils/scm/git/installation/linux} \subsection{Côté \emph{serveur}} +\skbinput[from=rep]{outils/scm/git/web/basicssh} +\skbinput[from=rep]{outils/scm/git/web/gitolite} \skbinput[from=rep]{outils/scm/git/web/gitlab} \skbinput[from=rep]{outils/scm/git/web/gogs} \section{Configuration} \subsection{Utilisateur} \skbinput[from=rep]{outils/scm/git/configuration/presentation} \skbinput[from=rep]{outils/scm/git/configuration/user} -\skbinput[from=rep]{outils/scm/git/configuration/alias} -\subsection{Dépôts} -\skbinput[from=rep]{outils/scm/git/configuration/gitignore} -\skbinput[from=rep]{outils/scm/git/commandes/remote/add} -\skbinput[from=rep]{outils/scm/git/commandes/branch/track} -\section{Ergonomie} +\subsection{Ergonomie} \skbinput[from=rep]{outils/scm/git/configuration/alias} \skbinput[from=rep]{outils/scm/git/configuration/editeur} -\skbinput[from=rep]{outils/scm/git/configuration/bash} -\section{Commandes} -\subsection{Pour démarrer un projet} +\skbinput[from=rep]{outils/scm/git/configuration/shell} +\subsection{Hooks} +\skbinput[from=rep]{outils/scm/git/configuration/hooks} +\part{Récapitulatif des commandes} +\frame{\partpage} +\section{Pour démarrer un projet} \skbinput[from=rep]{outils/scm/git/commandes/init} \skbinput[from=rep]{outils/scm/git/commandes/clone} -\subsection{Pour faire le point} +\section{Pour faire le point} \skbinput[from=rep]{outils/scm/git/commandes/status} \skbinput[from=rep]{outils/scm/git/commandes/diff} \skbinput[from=rep]{outils/scm/git/commandes/log} \skbinput[from=rep]{outils/scm/git/commandes/cherry} \skbinput[from=rep]{outils/scm/git/commandes/show} +\skbinput[from=rep]{outils/scm/git/commandes/bisect} +\skbinput[from=rep]{outils/scm/git/commandes/ls-files} \skbinput[from=rep]{outils/scm/git/commandes/blame} -\subsection{Pour modifier le contenu du dépôt} -\skbinput[from=rep]{outils/scm/git/stockage} +\section{Pour modifier le contenu du dépôt} \skbinput[from=rep]{outils/scm/git/commandes/checkout} \skbinput[from=rep]{outils/scm/git/commandes/pull} \skbinput[from=rep]{outils/scm/git/commandes/fetch} @@ -150,42 +155,46 @@ \skbinput[from=rep]{outils/scm/git/commandes/add} \skbinput[from=rep]{outils/scm/git/commandes/reset} \skbinput[from=rep]{outils/scm/git/commandes/clean} - \skbinput[from=rep]{outils/scm/git/commandes/commit} \skbinput[from=rep]{outils/scm/git/commandes/cherry-pick} \skbinput[from=rep]{outils/scm/git/commandes/revert} \skbinput[from=rep]{outils/scm/git/commandes/push} -\subsection{Pour organiser son développement} +\skbinput[from=rep]{outils/scm/git/commandes/filter-branch} +\section{Pour organiser son développement} \skbinput[from=rep]{outils/scm/git/commandes/branch} \skbinput[from=rep]{outils/scm/git/commandes/tag} -\section{Mise en pratique} -\subsection{Mise en place} +\section{Aide-mémoire} +\skbinput[from=rep]{outils/scm/git/commandes} +\part{Mise en pratique} +\frame{\partpage} +\section{Mise en place} \skbinput[from=rep]{outils/scm/git/exercices/exercice_01} \skbinput[from=rep]{outils/scm/git/exercices/exercice_01/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_02} \skbinput[from=rep]{outils/scm/git/exercices/exercice_02/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_03} \skbinput[from=rep]{outils/scm/git/exercices/exercice_03/steps} -\subsection{Dépôt individuel} +\section{Dépôt individuel} \skbinput[from=rep]{outils/scm/git/exercices/exercice_04} \skbinput[from=rep]{outils/scm/git/exercices/exercice_04/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_05} \skbinput[from=rep]{outils/scm/git/exercices/exercice_05/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_06} \skbinput[from=rep]{outils/scm/git/exercices/exercice_06/steps} -\subsection{Dépôt commun} +\section{Dépôt commun} \skbinput[from=rep]{outils/scm/git/exercices/exercice_07} \skbinput[from=rep]{outils/scm/git/exercices/exercice_07/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_08} \skbinput[from=rep]{outils/scm/git/exercices/exercice_08/steps} \skbinput[from=rep]{outils/scm/git/exercices/exercice_09} \skbinput[from=rep]{outils/scm/git/exercices/exercice_09/steps} -\subsection{Paquet debian} +\section{Paquet debian} \skbinput[from=rep]{outils/scm/git/exercices/exercice_10} \skbinput[from=rep]{outils/scm/git/exercices/exercice_10/steps} -\section{Pour aller plus loin} +\part{Pour aller plus loin} +\frame{\partpage} \skbinput[from=rep]{outils/scm/git/references/references} -\section{licence} +\part{licence} \skbinput[from=rep]{licences/license-cc-by-sa-2.0} \end{document} diff --git a/presentations/outils/git/gitdags.sty b/presentations/outils/git/gitdags.sty new file mode 100644 index 0000000..d247052 --- /dev/null +++ b/presentations/outils/git/gitdags.sty @@ -0,0 +1,279 @@ +%% +%% Copyright (C) 2014 by Julien Cretel +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Julien Cretel. +%% +%% This work currently consists of the file gitdags.sty. +%% +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesClass{gitdags} + [2014/08/28 v0.1 A package for drawing educational Git history graphs] + +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{tikz}} +\ProcessOptions\relax + +\RequirePackage{xcolor-solarized} +\RequirePackage{tikz} +\usetikzlibrary{ + arrows.meta, + graphs, + positioning, + shadows, + shapes, +} + +% conflict color +\colorlet{conflictcolor}{red} + +% custom shape, adapted from 102.5.3 in the TikZ 3.0 manual +\pgfdeclareshape{dogeared}{ + \inheritsavedanchors[from=rectangle] + \inheritanchorborder[from=rectangle] + \inheritanchor[from=rectangle]{center} + \inheritanchor[from=rectangle]{north} + \inheritanchor[from=rectangle]{south} + \inheritanchor[from=rectangle]{west} + \inheritanchor[from=rectangle]{east} + \backgroundpath{% + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y + \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt + \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}} + \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}} + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}} + \pgfpathclose + \pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}} + \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}} + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} + \pgfpathclose + } +} + +% To cancel a shadow (see http://tex.stackexchange.com/a/198298/21891) +\tikzset{reset preaction/.code={\def\tikz@preactions{}}} + +% --- repository history graphs --- +% style definitions +\tikzset{ + gitdags node/.style={ + draw, + node distance = 1.4em, + drop shadow = {opacity=0.15}, + font = \fontfamily{lmtt}\selectfont\small, + }, + DAGref/.style={ + gitdags node, + shape = rectangle, + minimum height = 1.4em, + draw = solarized-base01, + thick, + font = \fontfamily{lmtt}\selectfont\scriptsize, + }, + DAGedge/.style={ + semithick, + Latex-, + draw = gray, + }, + DAGrefedge/.style={ + DAGedge, + thick, + densely dotted, + }, + DAGcommit/.style={ + gitdags node, + shape = rounded rectangle, + rounded rectangle arc length = 90, + minimum height = 1.6em, + minimum width = 2em, + draw = solarized-base01, + fill = solarized-green!20, + very thick, + }, + graphs/DAG/.style={ + nodes = DAGcommit, + edges = DAGedge, + branch down = 3em, + grow right sep = 1.5em, + }, + gitareas/.style={ + gitdags node, + shape = rectangle, + rounded corners = .5em, + minimum width = 7em, + minimum height = 3em, + text opacity = 0.75, + semithick, + }, + gitSA/.style={ + gitareas, + anchor = north west, + xshift = 1em, + yshift = -1em, + draw = solarized-orange, + fill = solarized-orange!5, + text = solarized-orange, + }, + gitWT/.style={ + gitareas, + node distance = .6em, + draw = solarized-violet, + fill = solarized-violet!5, + text = solarized-violet, + }, + resetarrows/.style={ + -Stealth, + dashed, + thick, + draw = solarized-base02, + draw opacity = .75, + }, + highlighted commit/.style={ + DAGcommit, + reset preaction, + fill opacity = 0, + draw = solarized-base02, + }, + problematic commits/.style={ + reset preaction, + draw opacity = .25, + fill opacity = .25, + }, + graphs/unreachable/.style={ + problematic commits, + target edge style = problematic commits, + }, + graphs/conflict/.style={ + empty nodes, + problematic commits, + target edge style = problematic commits, + draw = conflictcolor, + fill = conflictcolor!25, + }, + placeholder commits/.style={ + reset preaction, + draw opacity = 0, + fill opacity = 0, + }, + graphs/placeholder/.style={ + placeholder commits, + target edge style = placeholder commits, + }, + blob/.style={ + shape = dogeared, + minimum width = 2em, + minimum height = 2.82em, + node distance = .75em, + line join = bevel, + draw = black, + fill = white, + align = left, + font = \ttfamily\tiny, + }, +} + +% directed acyclic graph +\newcommand\gitDAG[1][]{\graph[DAG,#1]} + +% helper macro (let's check the name's availability) +\newcommand\nodename@gitdags{} + +% local-branch reference +\newcommand\gitbranch[4][]{% + \renewcommand\nodename@gitdags{#1}% + \if\relax\detokenize{#1}\relax% check for empty optional argument + \renewcommand\nodename@gitdags{#2}% + \fi + \node[ + DAGref, + fill = yellow!30, + ] (\nodename@gitdags) [#3] {#2}; + \draw[DAGrefedge] (#4) -- (\nodename@gitdags); +} + +% remote-branch reference +\newcommand\gitremotebranch[4][]{% + \renewcommand\nodename@gitdags{#1}% + \if\relax\detokenize{#1}\relax% check for empty optional argument + \renewcommand\nodename@gitdags{#2}% + \fi + \node[ + DAGref, + fill = solarized-blue!20, + ] (\nodename@gitdags) [#3] {#2}; + \draw[DAGrefedge] (#4) -- (\nodename@gitdags); +} + +% tag reference +\newcommand\gittag[4][]{% + \renewcommand\nodename@gitdags{#1}% + \if\relax\detokenize{#1}\relax% check for empty optional argument + \renewcommand\nodename@gitdags{#2}% + \fi + \node[ + DAGref, + fill = solarized-magenta!20, + ] (\nodename@gitdags) [#3] {#2}; + \draw[DAGrefedge] (#4) -- (\nodename@gitdags); +} + +% HEAD symbolic reference +\newcommand\gitHEAD[2]{% + \node[ + DAGref, + fill = solarized-red!20, + node distance = 1em, + ] (gitHEAD) [#1] {HEAD}; + \draw[DAGrefedge] (#2) -- (gitHEAD); +} + +% the following macro is useful for explaining how merge conflicts arise +\newcommand\gitblob[2][] + {\node[blob,#1] {#2};} + +% to highlight a merge conflict arising in a given file +\newcommand\gitblobmc[1]{% + \node[ + blob, + draw = conflictcolor, + text = conflictcolor, + font = \scriptsize, + #1] {???}; +} + +% staging area and worktree +\newcommand\SAandWT{% + \node[ + gitSA, + ] (stagingarea) at (current bounding box.south east) {staging area}; + \node[ + gitWT, + below=of stagingarea, + ] (workingtree) {working tree}; +} + +% arrows pointing from a commit to the staging area or working tree +\newcommand\toSAorWT[2]{% + \node[highlighted commit] at (#1) {\phantom{#1}}; + \draw[resetarrows] (#1.south) to[out=290, in=170] + ([xshift=1em,yshift=-1em]#2.north west); +} + +\newcommand\toSAfrom[1]{\toSAorWT{#1}{stagingarea}} +\newcommand\toWTfrom[1]{\toSAorWT{#1}{workingtree}} + +\endinput diff --git a/presentations/outils/git/xcolor-solarized.sty b/presentations/outils/git/xcolor-solarized.sty new file mode 100644 index 0000000..b0163d6 --- /dev/null +++ b/presentations/outils/git/xcolor-solarized.sty @@ -0,0 +1,92 @@ +%% +%% This is file `xcolor-solarized.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xcolor-solarized.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2014 by Julien Cretel +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Julien Cretel. +%% +%% This work currently consists of the files xcolor-solarized.dtx, +%% xcolor-solarized.ins, and the derived file xcolor-solarized.sty. +%% + +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesPackage{xcolor-solarized} + [2015/02/17 v0.3 xcolor definitions for Ethan Schoonover's + Solarized theme] +\RequirePackage{xcolor}[2007/01/21] +\RequirePackage{kvoptions}[2011/06/30] +\SetupKeyvalOptions{ + family=solarized, + prefix=solarized@ +} +\DeclareStringOption[solarized-]{prefix} +\DeclareDefaultOption{% + \OptionNotUsed + \PackageError{xcolor-solarized}{Unknown `\CurrentOption' option} +} +\ProcessKeyvalOptions* +\newcommand\solarized@definecolor{\expandafter\definecolor\expandafter} +\solarized@definecolor{\solarized@prefix base03} {RGB}{000, 043, 054} +\solarized@definecolor{\solarized@prefix base02} {RGB}{007, 054, 066} +\solarized@definecolor{\solarized@prefix base01} {RGB}{088, 110, 117} +\solarized@definecolor{\solarized@prefix base00} {RGB}{101, 123, 131} +\solarized@definecolor{\solarized@prefix base0} {RGB}{131, 148, 150} +\solarized@definecolor{\solarized@prefix base1} {RGB}{147, 161, 161} +\solarized@definecolor{\solarized@prefix base2} {RGB}{238, 232, 213} +\solarized@definecolor{\solarized@prefix base3} {RGB}{253, 246, 227} +\solarized@definecolor{\solarized@prefix yellow} {RGB}{181, 137, 000} +\solarized@definecolor{\solarized@prefix orange} {RGB}{203, 075, 022} +\solarized@definecolor{\solarized@prefix red} {RGB}{220, 050, 047} +\solarized@definecolor{\solarized@prefix magenta}{RGB}{211, 054, 130} +\solarized@definecolor{\solarized@prefix violet} {RGB}{108, 113, 196} +\solarized@definecolor{\solarized@prefix blue} {RGB}{038, 139, 210} +\solarized@definecolor{\solarized@prefix cyan} {RGB}{042, 161, 152} +\solarized@definecolor{\solarized@prefix green} {RGB}{133, 153, 000} +\newcommand\solarizedPalette[1][3em]{% + \newcommand\solarized@square{\rule{#1}{#1}} + \noindent + \begin{tabular}{cccc cccc} + \textcolor{solarized-base03} \solarized@square & + \textcolor{solarized-base02} \solarized@square & + \textcolor{solarized-base01} \solarized@square & + \textcolor{solarized-base00} \solarized@square & + \textcolor{solarized-base0} \solarized@square & + \textcolor{solarized-base1} \solarized@square & + \textcolor{solarized-base2} \solarized@square & + \textcolor{solarized-base3} \solarized@square \\ + base03 & base02 & base01 & base00 & + base0 & base1 & base2 & base3 \\[#1] + \textcolor{solarized-yellow} \solarized@square & + \textcolor{solarized-orange} \solarized@square & + \textcolor{solarized-red} \solarized@square & + \textcolor{solarized-magenta}\solarized@square & + \textcolor{solarized-violet} \solarized@square & + \textcolor{solarized-blue} \solarized@square & + \textcolor{solarized-cyan} \solarized@square & + \textcolor{solarized-green} \solarized@square \\ + yellow & orange & red & magenta & + violet & blue & cyan & green + \end{tabular} +} +\endinput +%% +%% End of file `xcolor-solarized.sty'.