introduction_handouts.tex 1.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
\documentclass{article}
\usepackage{fullpage}
\usepackage{listings}

\frenchspacing
\setlength{\parindent}{0pt}
\pagestyle{empty}

\begin{document}
\begin{center}
{\bf Git Introduction Course}

Git Introduction practical.
\end{center}
\bigskip

17
\subsubsection*{Local configuration}
18 19 20 21
First, let Git know what your name and e-mail address is:
\begin{lstlisting}
  $ git config --global user.name "<Your Name>"
  $ git config --global user.email "<name@lumc.nl>"
22
  $ cat ~/.gitconfig
23 24 25
\end{lstlisting}
\bigskip

26 27 28 29 30 31 32
For the other practicals, it is convenient to have a \texttt{projects} folder
for your repositories:
\begin{lstlisting}
  mkdir ~/projects
  cd ~/projects
\end{lstlisting}

33
\subsubsection*{Remote configuration}
34 35 36 37 38 39 40 41 42 43 44 45 46 47
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/<username>/.ssh/id_rsa):
  Enter passphrase (empty for no passphrase):
  Enter same passphrase again:
\end{lstlisting}
You can leave all fields blank.
48
\bigskip
49 50

Open \texttt{https://git.lumc.nl} in your browser.
51
\medskip
52

53
In the authentication form, use your username and password.
54 55
\bigskip

56 57 58 59 60 61
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
62

63 64
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.
65 66 67 68 69 70 71
\medskip

Give your key a title (e.g., ``Course laptop'').
\medskip

Copy your ssh key to the key field (see the \texttt{cat} command above).

72
\end{document}