Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
courses
Git course
Commits
fe7463d8
Commit
fe7463d8
authored
Jun 20, 2014
by
Vermaat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update branching practical with three-way merge
parent
1483c89d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
branching/branching_handouts.tex
branching/branching_handouts.tex
+29
-2
No files found.
branching/branching_handouts.tex
View file @
fe7463d8
...
...
@@ -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 you
r
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}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment