From abd7af06af1d43f0624b6df406346473e1612028 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Fri, 20 Jun 2014 14:32:44 +0200 Subject: [PATCH] Add slide on merge --abort --- branching/branching.tex | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/branching/branching.tex b/branching/branching.tex index efbedfb..2b8311c 100644 --- a/branching/branching.tex +++ b/branching/branching.tex @@ -491,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 +513,30 @@ $ git commit \end{lstlisting} \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}. -- GitLab