introduction_handouts.tex 1.58 KB
 Laros committed Oct 13, 2013 1 2 \documentclass{article}  Laros committed Apr 24, 2016 3 \providecommand{\handoutsTitle}{Git Introduction}  Laros committed Oct 13, 2013 4   Laros committed Apr 24, 2016 5 6 \usepackage{handouts} \input{../shared/shared}  Laros committed Oct 13, 2013 7   Laros committed Apr 24, 2016 8 9 \begin{document} \makeHeader  Laros committed Oct 13, 2013 10   Laros committed Jun 20, 2014 11 \subsubsection*{Local configuration}  Laros committed Oct 13, 2013 12 13 First, let Git know what your name and e-mail address is: \begin{lstlisting}  Laros committed Apr 24, 2016 14 15  $git config --global user.name "Your Name"$ git config --global user.email "your@email.address"  Laros committed Oct 14, 2013 16  $cat ~/.gitconfig  Laros committed Oct 13, 2013 17 18 19 \end{lstlisting} \bigskip  Laros committed Apr 24, 2016 20 21 For the other practicals, it is convenient to have a \lstinline{projects} folder for your repositories:  Laros committed Jun 20, 2014 22 23 24 25 26 \begin{lstlisting} mkdir ~/projects cd ~/projects \end{lstlisting}  Laros committed Nov 30, 2015 27 \subsubsection*{Remote configuration}  Laros committed Oct 13, 2013 28 29 30 31 32 33 34 35 36 37 38 39 40 41 Check whether you have an ssh key: \begin{lstlisting}$ cat ~/.ssh/id_rsa.pub \end{lstlisting} \bigskip If not, make one: \begin{lstlisting} \$ ssh-keygen Enter file in which to save the key (/home//.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: \end{lstlisting} You can leave all fields blank.  Laros committed Jun 20, 2014 42 \bigskip  Laros committed Oct 13, 2013 43   Laros committed Apr 24, 2016 44 Open \url{https://git.lumc.nl} in your browser.  Laros committed Jun 20, 2014 45 \medskip  Laros committed Oct 13, 2013 46   Laros committed Nov 30, 2015 47 In the authentication form, use your username and password.  Laros committed Oct 13, 2013 48 49 \bigskip  Laros committed Nov 30, 2015 50 51 52 53 54 55 You can now edit your profile by clicking on the Profile Settings'' item in the menu on the left. \medskip Check your name and e-mail address (you probably want to change your name). \bigskip  Laros committed Jun 20, 2014 56   Laros committed Nov 30, 2015 57 58 To be able to upload new versions, you need to add your ssh key. Click the SSH Keys'' item and click the Add SSH Key'' button.  Laros committed Jun 20, 2014 59 60 61 62 63 \medskip Give your key a title (e.g., Course laptop''). \medskip  Laros committed Apr 24, 2016 64 Copy your ssh key to the key field (see the \lstinline{cat} command above).  Laros committed Jun 20, 2014 65   Laros committed Oct 13, 2013 66 \end{document}