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

Menu ajustement de présentation

ajout de switch
parent ac48a89c
......@@ -22,7 +22,7 @@
\institute[first.last@imag.fr]{[first].[last]@imag.fr\\
\url{http://systemes.pages.ensimag.fr/www-git/}}
\date{2019}
\date{2021}
\lstset{language=sh}
......@@ -46,9 +46,11 @@
\end{itemize}
\begin{alertblock}{Important missing point}
All code are just local. In real life, all "remote" stuff
should be added: git push, fetch and pull of every shared branches, commits
and tags; \lstinline{git push} remote management and \texttt{--set-upstream}.
All code in this presentation are local. In real life, all
"remote" stuff should be added: \mintinline{bash}{git push},
\mintinline{bash}{git fetch} and \mintinline{bash}{git pull} of every shared
branches, commits and tags; \mintinline{bash}{git push} remote management
and \texttt{--set-upstream}.
\end{alertblock}
\end{frame}
......@@ -59,7 +61,7 @@
\end{frame}
\begin{frame}[fragile] \frametitle{\texttt{git status}, one command to rule them all}
\lstinline{git status} displays the current state of the working
\mintinline{bash}{git status} displays the current state of the working
directory and the most relevant commands at the current state.
\footnotesize
\begin{semiverbatim}
......@@ -368,25 +370,26 @@ you@laptop$ git cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 # n'affiche
\frametitle{Branches, tags: references}
\begin{itemize}
\item In Java:
\begin{lstlisting}[language=Java,gobble=6]
\scriptsize
\begin{minted}[gobble=6]{Java}
String s; // Reference named s
s = new String("foo"); // Object pointed to by s
String s2 = s; // Two refs for the same object
\end{lstlisting}
\end{minted}
\item In Git: likewise!
\footnotesize
\begin{semiverbatim}
$ git log --oneline
{\color{blue!50!black}\bfseries{}5454e3b} add README.txt
7a7fb77 Initial commit
$ cat .git/HEAD
ref: refs/heads/master
$ cat .git/refs/heads/master
{\color{blue!50!black}\bfseries{}5454e3b}51e81d8d9b7e807f1fc21e618880c1ac9
$ git symbolic-ref HEAD
refs/heads/master
$ git rev-parse refs/heads/master
{\color{blue!50!black}\bfseries{}5454e3b}51e81d8d9b7e807f1fc21e618880c1ac9
$ git log --oneline
{\color{blue!50!black}\bfseries{}5454e3b} add README.txt
7a7fb77 Initial commit
$ cat .git/HEAD
ref: refs/heads/master
$ cat .git/refs/heads/master
{\color{blue!50!black}\bfseries{}5454e3b}51e81d8d9b7e807f1fc21e618880c1ac9
$ git symbolic-ref HEAD
refs/heads/master
$ git rev-parse refs/heads/master
{\color{blue!50!black}\bfseries{}5454e3b}51e81d8d9b7e807f1fc21e618880c1ac9
\end{semiverbatim}
% $
\end{itemize}
......@@ -650,18 +653,18 @@ you@laptop$ git cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 # n'affiche
\frametitle{Reminder: good comments}
\begin{itemize}
\item Bad: \only<2->{\alert{What? The code already tells}}
\begin{lstlisting}[language=Java,gobble=6]
\begin{minted}[gobble=6]{Java}
int i; // Declare i of type int
for (i = 0; i < 10; i++) { ... }
f(i)
\end{lstlisting}
\end{minted}
\item Possibly good: \only<2->{\alert{Why? Usually the relevant question}}
\begin{lstlisting}[language=Java,gobble=6]
\begin{minted}[gobble=6]{Java}
int i; // We need to declare i outside the for
// loop because we'll use it after.
for (i = 0; i < 10; i++) { ... }
f(i)
\end{lstlisting}
\end{minted}
\end{itemize}
\begin{overlayarea}{\textwidth}{0.3\textheight}
\only<3->{
......@@ -1308,19 +1311,19 @@ Explain here WHY your change is good.
The repository will now be developed using ``git-flow'' model.
Add a local tag, and a develop branch.
\begin{lstlisting}[language=sh,gobble=4]
git status
git tag -a v1.0
git checkout -b develop
git branch # should show *develop and master local branch
\begin{minted}[gobble=4]{console}
$ git status
$ git tag -a v1.0
$ git switch -c develop # or git checkout -b develop
$ git branch # should show *develop and master local branch
\end{lstlisting}
At each step, you must visualize the history with one of the two
following commands:
\begin{lstlisting}[language=sh,gobble=4]
git lg # alias log --all --graph --oneline
gitk --all
\end{lstlisting}
\begin{minted}[gobble=4]{console}
$ git lg # alias log --all --graph --oneline
$ gitk --all
\end{minted}
\end{frame}
\begin{frame}[fragile]
......@@ -1587,16 +1590,20 @@ Explain here WHY your change is good.
\begin{frame}[fragile]
\frametitle{Documentation about Configuration}
\begin{itemize}
\item \texttt{man git-config} : documents all configuration
\item \mintinline{bash}{man git-config} : documents all configuration
variables (>~350)
\item Example:
\scriptsize
\begin{verbatim}
user.email
Your email address to be recorded in any
newly created commits. Can be overridden
by the GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL,
and EMAIL environment variables.
See git-commit-tree(1).
user.name, user.email, author.name, author.email, committer.name,
committer.email
The user.name and user.email variables determine what ends up in
the author and committer field of commit objects. If you need the
author or committer to be different, the author.name, author.email,
committer.name or committer.email variables can be set. Also, all
of these can be overridden by the GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL and EMAIL
environment variables.
\end{verbatim}
\end{itemize}
\end{frame}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment