Commit a0100341 authored by Vermaat's avatar Vermaat
Browse files

Complete remote handouts

parent 8dfd0d8f
......@@ -13,64 +13,78 @@ Git and remote repositories practical.
\subsubsection*{Inspect the commit graph.}
We'll work from the repository you created in the previous practical.
\subsubsection*{Add your repository to GitLab.}
Now you have a nice repository, of course you want to share it on GitLab.
Go to GitLab and create a new project.
\item \emph{Question:} What is you 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
\item \emph{Question:} What is the repository URL for your new project?
\emph{Hint:} Use \texttt{git log} with the appropriate arguments.
\subsubsection*{Implement a feature in a new branch.}
Let's do some real work (e.g., add some documentation to the project).
Add a remote for your GitLab repository.
Start by creating a branch for your work (give it a descriptive name) and
switch to it.
Push your branch(es) to GitLab.
\item \emph{Question:} What branches are there now and what are the commits
they point to?
\item \emph{Question:} Can you see your repository content in the GitLab web
\subsubsection*{Clone an existing repository from GitLab.}
There already are some nice repositories on GitLab! Pick one (e.g., from the
person sitting next to you, or browse the public repositories using the globe
icon in the top right).
Implement your feature (e.g. write documentation) and commit your changes.
Create a local clone of the repository you picked.
\item \emph{Question:} What does the commit graph of you repository look
like now?
\item \emph{Question:} In the resulting repository, what remotes and
branches exist?
\subsubsection*{For experts: create a merge request.}
If you are interested, here are some additional GitLab features you can
use. Fork an existing project, implement a feature, and submit a merge
\subsubsection*{Merge your feature.}
Of course we want this nice feature in our \texttt{master} branch.
Find an interesting project and click the \emph{Fork} button. This makes a
copy of the project under your own user, on GitLab.
\item \emph{Question:} If you want to merge branch \texttt{B} into branch
\texttt{A}, what should be your current branch?
Clone the project (your fork) to your local machine.
Merge your feature branch into \texttt{master}.
Create a new branch and implement some feature in it. Make sure to commit
\item \emph{Question:} What does the commit graph of you repository look
like now?
Push your new branch to GitLab (your fork of the project).
If you now go to your GitLab dashboard (homepage), you'll see a green button
to create a merge request. From the merge request, the owner of the original
project can directly merge your changes using only the web interface.
Since you merged it, you can now delete the feature branch.
\emph{Hint:} You can also start a discussion or do some code review inside the
merge request.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment