Skip to content
Snippets Groups Projects

Updates martijn

Merged Martijn Vermaat requested to merge updates_martijn into master
+ 86
12
Compare changes
  • Side-by-side
  • Inline
Files
+ 32
6
@@ -2,7 +2,7 @@
\title{Working with branches in Git}
\providecommand{\myConference}{Git course}
\providecommand{\myDate}{Monday, October 14, 2013}
\providecommand{\myDate}{Monday, June 23, 2014}
\author{Martijn Vermaat}
\providecommand{\myGroup}{Leiden Genome Technology Center}
\providecommand{\myDepartment}{Department of Human Genetics}
@@ -69,9 +69,10 @@
\begin{frame}
\frametitle{The current commit: \bt{HEAD}}
\begin{itemize}
\item The current commit is called \bt{HEAD} (shown in blue).
\item \bt{HEAD} normally points to the current branch.
\item Or to a commit if there is no current branch.
\item The current commit is called \bt{HEAD} (shown in blue here).
\item \bt{HEAD} is actually a pointer to the current branch.
\item (Or to the current commit if there is no current branch -- this is
called detached head state.)
\end{itemize}
\vspace{1cm}
\includegraphics[width=10cm]{images/head}
@@ -82,7 +83,7 @@
\begin{itemize}
\item Committing moves the current branch to the new commit.
\item Of course, \bt{HEAD} moves with it.
\item If there is no current branch, only \bt{HEAD} moves.
\item (In detached head state, only \bt{HEAD} moves.)
\end{itemize}
\vspace{1cm}
\includegraphics[width=10cm]{images/commit}
@@ -490,7 +491,7 @@ $ emacs README
\end{frame}
\begin{frame}[fragile]
\frametitle{Resolving a merge conflict (1/2)}
\frametitle{Resolving a merge conflict (2/2)}
We resolve the conflict by hand.
\bigskip
\begin{lstlisting}
@@ -513,6 +514,30 @@ $ git commit
\end{frame}
\begin{frame}[fragile]
\frametitle{Aborting a merge}
If you don't feel like resolving the merge conflict, you can go back with
\bt{git merge --abort}.
\bigskip
\begin{lstlisting}
$ git merge simpsons
Auto-merging README
CONFLICT (content): Merge conflict in README
Automatic merge failed; fix conflicts and then
commit the result.
\end{lstlisting}
\bigskip
\begin{lstlisting}
$ git merge --abort
\end{lstlisting}
\bigskip
\begin{lstlisting}
$ git status
# On branch master
nothing to commit (working directory clean)
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Resolving conflicts with \bt{git mergetool}}
We can also use graphical merge tools such as {\em Meld}.
\bigskip
@@ -549,6 +574,7 @@ Hit return to start merge resolution tool (meld):
Zuotian Tatum
Wibowo Arindrarto
\end{center}
\vfill
\permfoot{http://git-scm.com/book}\\
Loading