Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Git course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
courses
Git course
Commits
fe7463d8
Commit
fe7463d8
authored
10 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Update branching practical with three-way merge
parent
1483c89d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Updates martijn
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
branching/branching_handouts.tex
+29
-2
29 additions, 2 deletions
branching/branching_handouts.tex
with
29 additions
and
2 deletions
branching/branching_handouts.tex
+
29
−
2
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}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment