Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Git course
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
courses
Git course
Commits
ca4121df
Commit
ca4121df
authored
Oct 14, 2013
by
Jeroen F.J. Laros
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.lumc.nl:j.f.j.laros/gitcourse
parents
0d155f54
0bd7ff37
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
6 deletions
+172
-6
branching/branching.tex
branching/branching.tex
+3
-2
branching/branching_handouts.tex
branching/branching_handouts.tex
+76
-0
remotes/remotes.tex
remotes/remotes.tex
+3
-4
remotes/remotes_handouts.tex
remotes/remotes_handouts.tex
+90
-0
No files found.
branching/branching.tex
View file @
ca4121df
...
...
@@ -549,9 +549,10 @@ Hit return to start merge resolution tool (meld):
Zuotian Tatum
% https://www.atlassian.com/git
\end{center}
\vfill
\permfoot
{
http://git-scm.com/book
}
\\
\permfoot
{
https://www.atlassian.com/git
}
\end{frame}
\end{document}
branching/branching_handouts.tex
0 → 100644
View file @
ca4121df
\documentclass
{
article
}
\usepackage
{
fullpage
}
\frenchspacing
\setlength
{
\parindent
}{
0pt
}
\pagestyle
{
empty
}
\begin{document}
\begin{center}
{
\bf
Git Introduction Course
}
Working with branches in Git practical.
\end{center}
\bigskip
\subsubsection*
{
Inspect the commit graph.
}
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
the commit it points to?
\item
\emph
{
Question:
}
What does the commit graph of you repository look
like?
\end{itemize}
\emph
{
Hint:
}
Use
\texttt
{
git log
}
with the appropriate arguments.
\bigskip
\subsubsection*
{
Implement a feature in a new branch.
}
Let's do some real work (e.g., add some documentation to the project).
\bigskip
Start by creating a branch for your work (give it a descriptive name) and
switch to it.
\begin{itemize}
\item
\emph
{
Question:
}
What branches are there now and what are the commits
they point to?
\end{itemize}
\bigskip
Implement your feature (e.g. write documentation) and commit your changes.
\begin{itemize}
\item
\emph
{
Question:
}
What does the commit graph of you repository look
like now?
\end{itemize}
\bigskip
\subsubsection*
{
Merge your feature.
}
Of course we want this nice feature in our
\texttt
{
master
}
branch.
\bigskip
\begin{itemize}
\item
\emph
{
Question:
}
If you want to merge branch
\texttt
{
B
}
into branch
\texttt
{
A
}
, what should be your current branch?
\end{itemize}
\bigskip
Merge your feature branch into
\texttt
{
master
}
.
\begin{itemize}
\item
\emph
{
Question:
}
What does the commit graph of you repository look
like now?
\end{itemize}
\bigskip
Since you merged it, you can now delete the feature branch.
\end{document}
remotes/remotes.tex
View file @
ca4121df
...
...
@@ -297,8 +297,6 @@ $ git pull ==> $ git fetch origin
\end
{
itemize
}
\end
{
frame
}
% todo: create gitlab project, clone gitlab project
\section
{
Questions?
}
\lastpagetemplate
\begin
{
frame
}
...
...
@@ -311,9 +309,10 @@ $ git pull ==> $ git fetch origin
Zuotian Tatum
% https://www.atlassian.com/git
\end
{
center
}
\vfill
\permfoot
{
http:
//
git
-
scm.com
/
book
}
\\
\permfoot
{
https:
//
www.atlassian.com
/
git
}
\end
{
frame
}
\end
{
document
}
remotes/remotes_handouts.tex
0 → 100644
View file @
ca4121df
\documentclass
{
article
}
\usepackage
{
fullpage
}
\frenchspacing
\setlength
{
\parindent
}{
0pt
}
\pagestyle
{
empty
}
\begin{document}
\begin{center}
{
\bf
Git Introduction Course
}
Git and remote repositories practical.
\end{center}
\bigskip
\subsubsection*
{
Add your repository to GitLab.
}
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}
\item
\emph
{
Question:
}
What is the repository URL for your new project?
\end{itemize}
\bigskip
Add a remote for your GitLab repository.
\bigskip
Push your branch(es) to GitLab.
\begin{itemize}
\item
\emph
{
Question:
}
Can you see your repository content in the GitLab web
interface?
\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
Create a local clone of the repository you picked.
\begin{itemize}
\item
\emph
{
Question:
}
In the resulting repository, what remotes and
branches exist?
\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
Find an interesting project and click the
\emph
{
Fork
}
button. This makes a
copy of the project under your own user, on GitLab.
\bigskip
Clone the project (your fork) to your local machine.
\bigskip
Create a new branch and implement some feature in it. Make sure to commit
this.
\bigskip
Push your new branch to GitLab (your fork of the project).
\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
\emph
{
Hint:
}
You can also start a discussion or do some code review inside the
merge request.
\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