Skip to content

Commit

Permalink
Extra graphs + comments eruit
Browse files Browse the repository at this point in the history
Hernoem branchings naar diagrams in makefile
Update travis.yml nu wel gelijk
Verander slides zodat ze overlays gebruiken en minder bolletjes kosten
Uitgecommentte dingen eruit want het zit toch in git
  • Loading branch information
maartenberg committed Feb 16, 2016
1 parent 0957936 commit 1732eee
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ before_script:
- "wget https://github.com/gpoore/minted/releases/download/v2.1/minted-2.1.zip"
- "unzip -j minted-2.1.zip minted-2.1/minted.sty -d ."
script:
- make branchings
- make diagrams
- make pdf
- make pdf
deploy:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
pdf: graphs
pdflatex -shell-escape main.tex

branchings:
diagrams:
for file in graphs/branching*.gv; do\
dot -Teps -o graphs/`basename $$file .gv`.eps $$file;\
done
for file in graphs/basis*.gv; do\
dot -Teps -o graphs/`basename $$file .gv`.eps $$file;\
done
4 changes: 4 additions & 0 deletions graphs/basis1.gv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
digraph repo {
rankdir = "RL";
B -> A;
}
5 changes: 5 additions & 0 deletions graphs/basis2.gv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
digraph repo {
rankdir = "RL";
B -> A;
C -> B;
}
9 changes: 9 additions & 0 deletions graphs/basis3.gv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
digraph repo {
rankdir = "RL";
B -> A;
C -> B;
node [shape=box,color=grey] master;
master -> C;
HEAD -> master;
{ rank=same HEAD; master; C; }
}
11 changes: 11 additions & 0 deletions graphs/basis4.gv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

digraph repo {
rankdir = "RL";
B -> A;
C -> B;
node [shape=box,color=grey] master;
master -> C;
HEAD -> B;
{ rank=same master; C; }
{ rank=same HEAD; B; }
}
158 changes: 52 additions & 106 deletions sections/branching.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,122 +15,67 @@ \subsection{Wat zijn branches?}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching1.eps}
\only<1>{
\includegraphics[width=.7\textwidth]{graphs/branching1.eps}
}
\only<2>{
\includegraphics[width=.7\textwidth]{graphs/branching2.eps}
}
\only<3>{
\includegraphics[width=.7\textwidth]{graphs/branching3.eps}
}
\only<4>{
\includegraphics[width=.7\textwidth]{graphs/branching4.eps}
}
\only<5>{
\includegraphics[width=.7\textwidth]{graphs/branching5.eps}
}
\only<6>{
\includegraphics[width=.7\textwidth]{graphs/branching6.eps}
}
\only<7>{
\includegraphics[width=.7\textwidth]{graphs/branching7.eps}
}
\only<8>{
\includegraphics[width=.7\textwidth]{graphs/branching8.eps}
}
\only<9>{
\includegraphics[width=.7\textwidth]{graphs/branching9.eps}
}
\end{center}
\only<2>{
\texttt{git branch branch}
}
\only<3>{
\texttt{git checkout branch}
}
\only<4>{
\ldots, \texttt{git commit}
}
\only<5>{
\texttt{git checkout master}
}
\only<6>{
\texttt{git checkout branch}, \ldots, \texttt{git commit}
}
\only<7>{
\texttt{git checkout master; git merge branch}
}
\only<8>{
\texttt{git checkout master}, \ldots, \texttt{git commit}
}
\only<9>{
\texttt{git merge branch}
}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching2.eps}
\end{center}
\texttt{git branch branch}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching3.eps}
\end{center}
\texttt{git checkout branch}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching4.eps}
\end{center}
\ldots, \texttt{git commit}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching5.eps}
\end{center}
\texttt{git checkout master}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching6.eps}
\end{center}
\texttt{git checkout branch}, \ldots, \texttt{git commit}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching7.eps}
\end{center}
\texttt{git checkout master; git merge branch}
\end{frame}

\begin{frame}
Master kan veranderen:
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/branching8.eps}
\end{center}
\texttt{git checkout master}, \ldots, \texttt{git commit}
\end{frame}

\begin{frame}
\begin{center}
\includegraphics[width=\textwidth]{graphs/branching9.eps}
\end{center}
\texttt{git merge branch}
\end{frame}

%\begin{frame}[fragile]
%\begin{minted}[fontsize=\footnotesize,bgcolor=light-gray]{console}
%$ echo "A" > bestand.txt
%$ git add bestand.txt; git commit -m "Maak bestand A"
%[master (root-commit) fd92806] Voeg bestand toe naar versie A
%1 file changed, 1 insertion(+)
%create mode 100644 bestand.txt
%$ git branch volgendeversie
%$ git checkout volgendeversie
%$ git status
%On branch volgendeversie
%nothing to commit, working directory clean
%$ echo "Waardevolle toevoeging die" >> bestand.txt
%$ git add bestand.txt; git commit -m "Begin volgende versie"
%[volgendeversie 5aebde9] Begin volgende versie
%1 file changed, 1 insertion(+)
%$ git checkout master
%$ cat bestand.txt
%A
%$ git checkout volgendeversie
%$ cat bestand.txt
%A
%Waardevolle toevoeging die
%\end{minted}
%\end{frame}

%\begin{frame}[fragile]
%\begin{minted}[fontsize=\footnotesize,bgcolor=light-gray]{console}
%$ echo "later pas af is gemaakt" >> bestand.txt
%$ git add bestand.txt; git commit -m "Maakt volgende versie af"
%[volgendeversie 829e8d8] Maakt volgende versie af
%1 file changed, 1 insertion(+)
%$ git checkout master
%$ git merge volgendeversie
%Updating fd92806..829e8d8
%Fast-forward
%bestand.txt | 2 ++
%1 file changed, 2 insertions(+)
%$ cat bestand.txt
%A
%Waardevolle toevoeging die
%later pas af is gemaakt
%\end{minted}
%\end{frame}

\subsection{Branches starten}
\begin{frame}{Branches starten}
\begin{itemize}
\item Standaard zit je op branch \texttt{master}
\item Splits hiervanaf met \texttt{git branch <naam>}
\item Splitsen van een eerdere commit:\\
\texttt{git branch <naam> <hash>}
%\item Geef aan dat je op die branch verder wil:\\
%\texttt{git checkout <naam>}\\
%(dit is anders dan bijv. svn's \texttt{checkout}!
\end{itemize}
\end{frame}

Expand Down Expand Up @@ -185,6 +130,7 @@ \subsection{Branchen en workflows}
\begin{frame}{Workflows bij branchen}
\alert{Beste optie: topic branches}
\begin{itemize}
\item Voor iedere feature een nieuwe branch, mergen wanneer klaar
\item Je kan altijd \emph{gemakkelijk} terug naar voor je begon
\item Je kan wijzigingen maken die nog niet helemaal werken / af zijn
\item Base branch kan wijzigen (samenwerken!) zonder dat je in de problemen zit
Expand Down
15 changes: 13 additions & 2 deletions sections/gettingstarted.tex
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ \subsection{Bestanden laten bijhouden}
\end{frame}

\subsubsection{Wat is hier gebeurd?}
\begin{frame}
\begin{frame}{Wat is er nu eigenlijk gebeurd?}
\begin{center}
graph hier
\includegraphics[width=.7\textwidth]{graphs/basis1.eps}<1>
\includegraphics[width=.7\textwidth]{graphs/basis2.eps}<2>
\end{center}
\end{frame}

Expand Down Expand Up @@ -191,6 +192,16 @@ \subsection{Bestanden terugdraaien naar eerdere versie}
\end{itemize}
\end{frame}

\begin{frame}{Detached HEAD in plaatjes}
\begin{center}
\includegraphics[width=.7\textwidth]{graphs/basis3.eps}<1,3>
\includegraphics[width=.7\textwidth]{graphs/basis4.eps}<2>
\end{center}
\only<1>{Basisstaat van eerder}
\only<2>{\texttt{git checkout master} (niet \texttt{C}!)}
\only<3>{\texttt{git checkout B}}
\end{frame}

\subsection{Commits ongedaan maken}
\begin{frame}{git revert}
\begin{itemize}
Expand Down
1 change: 1 addition & 0 deletions sections/git-waarom.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ \subsection{Waarom git?}
\begin{itemize}
\item Hetzelfde over alle platforms
\item GUIs gebruiken zelfde namen voor dingen
\item GUI gaat kapot: `ja ga maar command line'
\item (Er zijn 2 meegeleverde GUI-opties)
\end{itemize}
Goede GUIs: zie \href{https://git-scm.com/downloads/guis}{de site van git}
Expand Down

0 comments on commit 1732eee

Please sign in to comment.