remotes_handouts.tex 2.03 KB
 Martijn Vermaat committed Oct 14, 2013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \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  Martijn Vermaat committed Oct 14, 2013 16 17 18 19 20 21 \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.  Martijn Vermaat committed Oct 14, 2013 22 23  \begin{itemize}  Martijn Vermaat committed Oct 14, 2013 24  \item \emph{Question:} What is the repository URL for your new project?  Martijn Vermaat committed Oct 14, 2013 25 26 27 28 \end{itemize} \bigskip  Martijn Vermaat committed Oct 14, 2013 29 Add a remote for your GitLab repository.  Martijn Vermaat committed Oct 14, 2013 30 31 32  \bigskip  Martijn Vermaat committed Oct 14, 2013 33 Push your branch(es) to GitLab.  Martijn Vermaat committed Oct 14, 2013 34 35  \begin{itemize}  Martijn Vermaat committed Oct 14, 2013 36 37  \item \emph{Question:} Can you see your repository content in the GitLab web interface?  Martijn Vermaat committed Oct 14, 2013 38 39 \end{itemize}  Martijn Vermaat committed Oct 14, 2013 40 41 42 43 44 45  \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).  Martijn Vermaat committed Oct 14, 2013 46 47 \bigskip  Martijn Vermaat committed Oct 14, 2013 48 Create a local clone of the repository you picked.  Martijn Vermaat committed Oct 14, 2013 49 50  \begin{itemize}  Martijn Vermaat committed Oct 14, 2013 51 52  \item \emph{Question:} In the resulting repository, what remotes and branches exist?  Martijn Vermaat committed Oct 14, 2013 53 54 \end{itemize}  Martijn Vermaat committed Oct 14, 2013 55 56 57 58 59 60  \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.  Martijn Vermaat committed Oct 14, 2013 61 62 \bigskip  Martijn Vermaat committed Oct 14, 2013 63 64 Find an interesting project and click the \emph{Fork} button. This makes a copy of the project under your own user, on GitLab.  Martijn Vermaat committed Oct 14, 2013 65 66 67  \bigskip  Martijn Vermaat committed Oct 14, 2013 68 Clone the project (your fork) to your local machine.  Martijn Vermaat committed Oct 14, 2013 69 70 71  \bigskip  Martijn Vermaat committed Oct 14, 2013 72 73 Create a new branch and implement some feature in it. Make sure to commit this.  Martijn Vermaat committed Oct 14, 2013 74   Martijn Vermaat committed Oct 14, 2013 75 76 77 78 79 80 81 82 83 \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.  Martijn Vermaat committed Oct 14, 2013 84 85 86  \bigskip  Martijn Vermaat committed Oct 14, 2013 87 88 \emph{Hint:} You can also start a discussion or do some code review inside the merge request.  Martijn Vermaat committed Oct 14, 2013 89 90  \end{document}