Skip to content
Snippets Groups Projects
Commit fe7463d8 authored by Vermaat's avatar Vermaat
Browse files

Update branching practical with three-way merge

parent 1483c89d
No related branches found
No related tags found
1 merge request!4Updates martijn
......@@ -17,15 +17,20 @@ Working with branches in Git practical.
We'll work from the repository you created in the previous practical.
\begin{itemize}
\item \emph{Question:} What is you current branch and what is the hash of
\item \emph{Question:} What is your current branch and what is the hash of
the commit it points to?
\item \emph{Question:} What does the commit graph of you repository look
like?
like? Can you draw it on paper?
\end{itemize}
\emph{Hint:} Use \texttt{git log} with the appropriate arguments.
\bigskip
As an alternative to \texttt{git log}, you can also try a graphical viewer
such as \texttt{gitg} (installed on the course laptops) or \texttt{gitk}.
\bigskip
\subsubsection*{Implement a feature in a new branch.}
Let's do some real work (e.g., add some documentation to the project).
......@@ -73,4 +78,26 @@ Merge your feature branch into \texttt{master}.
Since you merged it, you can now delete the feature branch.
\bigskip
\subsubsection*{A three-way merge.}
Unless you were extremely zealous, the last section produced a fast-forward
merge.
\bigskip
\begin{itemize}
\item \emph{Question:} Can you think of a way to get a three-way merge?
\end{itemize}
\bigskip
Manipulate your repository in such a way that the commit graph contains a
merge commit (created by a three-way merge).
\begin{itemize}
\item \emph{Question:} What does the commit graph of you repository look
like now?
\end{itemize}
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment