\documentclass[14pt]{beamer}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{graphicx}

\usepackage{helvet}
%\setbeamercovered{transparent}
\usetheme{Boadilla}
\usecolortheme{beaver}
\setbeamercovered{transparent}
\AtBeginSection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}

\author[SC \& TH]{Thibaut Horel \and Stéphane Caron}
\institute{Technicolor, Palo Alto}
\date{\today}
\title[Git workshop]{A Git approach to collaborative work in research}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Problem}
\alert{Goal:} 2 or more people want to:
\begin{itemize}
\item easily share files
\item work concurrently on these files
\item keep track of what everybody is doing
\end{itemize}
\pause
\vspace{2em}
Examples:
\begin{itemize}
\item writing a paper
\item writing code
\item \ldots
\end{itemize}
\end{frame}

\begin{frame}{Bad solutions}
\begin{itemize}
\item Email attachments\visible<2->{: nobody in their right mind wants to do that}
\vspace{2em}
\item Dropbox\visible<3->{: Good for file sharing, terrible at handling concurrency}
\end{itemize}
\end{frame}

\begin{frame}{Version Control Systems}
\begin{itemize}
\item designed exactly for this purpose
\vspace{2em}
\item several flavors:
\begin{itemize}
\item centralized (ex: Subversion)
\item decentralized (ex: Git)
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}{Overview}
\includegraphics[width=\textwidth]{figures/commits.pdf}
\end{frame}

\begin{frame}{Local vs. distant history}
Everything can be done locally:
\begin{center}
\includegraphics[scale=.9]{figures/overview.pdf}
\end{center}
\end{frame}

\begin{frame}{Initialising}
Existing repository:

\begin{block}{}
{\tt \$ git clone <user>@palosgit01:/git/<project>}
\end{block}

\vspace{2em}

Non-existing repository:
\begin{itemize}
\item Ask Umar to create a project for your team
\item Repeat previous step
\end{itemize}
\end{frame}

\begin{frame}{Local editing}
\begin{itemize}
\item Edit a few files
\vspace{2em}
\item When you are happy with the state of the project:
\begin{block}{}
{\tt \$ git commit -a -m "Proof of the uniqueness theorem"}
\end{block}
\end{itemize}
\end{frame}

\begin{frame}{File tracking}

\begin{itemize}
\item By default Git does not track new files
\item Adding a new file:
\begin{block}{}
{\tt \$ git add <filename>}
\end{block}
\end{itemize}
\vspace{2em}
Which file should you add to the project?
\end{frame}

\begin{frame}{Synchronizing with other people}
\includegraphics[width=\textwidth]{figures/git-push.pdf}
\end{frame}

\begin{frame}
\includegraphics[width=\textwidth]{figures/git-pull.pdf}
\end{frame}

\begin{frame}
\includegraphics[width=\textwidth]{figures/git-pull-2.pdf}
\end{frame}

\begin{frame}
\includegraphics[width=\textwidth]{figures/git-merge-ok.pdf}
\end{frame}



\begin{frame}
\begin{center}
\includegraphics[scale=.9]{figures/git-merge-conflict.pdf}
\end{center}
\end{frame}

\end{document}
