diff --git a/imgs/graph_gitlab.png b/imgs/graph_gitlab.png new file mode 100644 index 0000000000000000000000000000000000000000..94f8c7c8fa884543180e0a9c8f902999b1dd0b6a Binary files /dev/null and b/imgs/graph_gitlab.png differ diff --git a/src/tex/gestion_non_lineaire/application_git.tex b/src/tex/gestion_non_lineaire/application_git.tex index 90165d412bcd0d2926ef703907e57a449fb0e6d6..2ba7504a4134489745ff49ba965ee138c59ba03e 100644 --- a/src/tex/gestion_non_lineaire/application_git.tex +++ b/src/tex/gestion_non_lineaire/application_git.tex @@ -1,11 +1,58 @@ -\begin{frame} - \frametitle{Gestion des branches} +\begin{frame}[fragile] + \frametitle{Gestion pratique des branches} + \begin{block}{Création d'une branche} + \begin{itemize} + \item \verb+git branch + pour créer une branche ; + \item \verb+git checkout -b + pour créer une branche et changer la branche courante pour celle-ci. + \end{itemize} + \end{block} + + \Pause + + \begin{block}{Statut des branches} + \begin{itemize} + \item La commande \verb+git status+ indique la branche courante; + \item La commande \verb+git branch+ montre la liste des branches et la branche courante. + \end{itemize} + \end{block} + + \Pause + + \begin{block}{Suppression d'une branche} + \begin{itemize} + \item \verb+git branch -d + pour supprimer une branche; + \item Si la branche n'a pas été fusionnée, \verb+git branch -D +. + \end{itemize} + \end{block} \end{frame} -\begin{frame} +\begin{frame}[fragile] \frametitle{Changer de branche} + \framesubtitle{Plus facile qu'à l'UTC !} + \begin{block}{Comment faire ?} + \begin{itemize} + \item Une commande simple : \verb+git checkout +; + \item {\bf Attention :} ne pas avoir de changements non validés ! (ou passer par un \verb+git stash+) + \end{itemize} + \end{block} + + \Pause + + \begin{block}{Rappel} + \verb+git checkout+ sert aussi à se déplacer sur un commit précis. \\ + En fait, cette commande sert à déplacer le \verb+HEAD+. On peut assimiler un \verb+checkout+ sur une branche à un \verb+checkout+ sur un commit.\\ + En fait, le nom de le branche n'est {\bf qu'une étiquette} sur le dernier commit de celle-ci. + \end{block} \end{frame} -\begin{frame} +\begin{frame}[fragile] \frametitle{Visualisation} + \framesubtitle{Un joli graphe !} + \begin{itemize} + \item En console : \verb+git log --graph --decorate --all+ + \item Depuis GitLab : + \end{itemize} + \begin{center} + \includegraphics[height=.5\paperheight]{imgs/graph_gitlab.png} + \end{center} \end{frame}