introduction_handouts.tex 1.58 KB
Newer Older
1 2
\documentclass{article}

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
3
\providecommand{\handoutsTitle}{Git Introduction}
4

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
5 6
\usepackage{handouts}
\input{../shared/shared}
7

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
8 9
\begin{document}
\makeHeader
10

11
\subsubsection*{Local configuration}
12 13
First, let Git know what your name and e-mail address is:
\begin{lstlisting}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
14 15
  $ git config --global user.name "Your Name"
  $ git config --global user.email "your@email.address"
16
  $ cat ~/.gitconfig
17 18 19
\end{lstlisting}
\bigskip

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
20 21
For the other practicals, it is convenient to have a \lstinline{projects}
folder for your repositories:
22 23 24 25 26
\begin{lstlisting}
  mkdir ~/projects
  cd ~/projects
\end{lstlisting}

27
\subsubsection*{Remote configuration}
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/<username>/.ssh/id_rsa):
  Enter passphrase (empty for no passphrase):
  Enter same passphrase again:
\end{lstlisting}
You can leave all fields blank.
42
\bigskip
43

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
44
Open \url{https://git.lumc.nl} in your browser.
45
\medskip
46

47
In the authentication form, use your username and password.
48 49
\bigskip

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
56

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.
59 60 61 62 63
\medskip

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

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
64
Copy your ssh key to the key field (see the \lstinline{cat} command above).
65

66
\end{document}