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
a0100341
Commit
a0100341
authored
11 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Complete remote handouts
parent
8dfd0d8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
remotes/remotes_handouts.tex
+42
-28
42 additions, 28 deletions
remotes/remotes_handouts.tex
with
42 additions
and
28 deletions
remotes/remotes_handouts.tex
+
42
−
28
View file @
a0100341
...
@@ -13,64 +13,78 @@ Git and remote repositories practical.
...
@@ -13,64 +13,78 @@ Git and remote repositories practical.
\end{center}
\end{center}
\bigskip
\bigskip
\subsubsection*
{
Inspect the commit graph.
}
\subsubsection*
{
Add your repository to GitLab.
}
We'll work from the repository you created in the previous practical.
Now you have a nice repository, of course you want to share it on GitLab.
\bigskip
Go to GitLab and create a new project.
\begin{itemize}
\begin{itemize}
\item
\emph
{
Question:
}
What is you current branch and what is the hash of
\item
\emph
{
Question:
}
What is the repository URL for your new project?
the commit it points to?
\item
\emph
{
Question:
}
What does the commit graph of you repository look
like?
\end{itemize}
\end{itemize}
\emph
{
Hint:
}
Use
\texttt
{
git log
}
with the appropriate arguments.
\bigskip
\bigskip
\subsubsection*
{
Implement a feature in a new branch.
}
Add a remote for your GitLab repository.
Let's do some real work (e.g., add some documentation to the project).
\bigskip
\bigskip
Start by creating a branch for your work (give it a descriptive name) and
Push your branch(es) to GitLab.
switch to it.
\begin{itemize}
\begin{itemize}
\item
\emph
{
Question:
}
What branches are there now and what are the commits
\item
\emph
{
Question:
}
Can you see your repository content in the GitLab web
they point to
?
interface
?
\end{itemize}
\end{itemize}
\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).
\bigskip
\bigskip
Implement your feature (e.g. write documentation) and commit your changes
.
Create a local clone of the repository you picked
.
\begin{itemize}
\begin{itemize}
\item
\emph
{
Question:
}
What does the commit graph of you repository look
\item
\emph
{
Question:
}
In the resulting repository, what remotes and
like now
?
branches exist
?
\end{itemize}
\end{itemize}
\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
request.
\bigskip
\bigskip
\subsubsection*
{
Merge your feature.
}
Find an interesting project and click the
\emph
{
Fork
}
button. This makes a
Of course we want this nice feature in our
\texttt
{
master
}
branch
.
copy of the project under your own user, on GitLab
.
\bigskip
\bigskip
\begin{itemize}
Clone the project (your fork) to your local machine.
\item
\emph
{
Question:
}
If you want to merge branch
\texttt
{
B
}
into branch
\texttt
{
A
}
, what should be your current branch?
\end{itemize}
\bigskip
\bigskip
Merge your feature branch into
\texttt
{
master
}
.
Create a new branch and implement some feature in it. Make sure to commit
this.
\begin{itemize}
\bigskip
\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).
\end{itemize}
\bigskip
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.
\bigskip
\bigskip
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.
\end{document}
\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