Skip to content
Snippets Groups Projects
Commit 70584b68 authored by Vermaat's avatar Vermaat
Browse files

Merge branch 'jfjlaros_2014' into 'master'

Jfjlaros 2014
parents ef4d7217 d42938da
No related branches found
No related tags found
No related merge requests found
Showing
with 148 additions and 133 deletions
../pics/src/18333fig0101-tn.png
\ No newline at end of file
../pics/src/18333fig0102-tn.png
\ No newline at end of file
../pics/src/18333fig0103-tn.png
\ No newline at end of file
......@@ -31,9 +31,8 @@
% First page of the presentation.
\section{Introduction}
\begin{frame}
\frametitle{Version control.}
\subsection{Version control}
\begin{pframe}
\emph{The management of changes to documents, computer programs, large web
sites, and other collections of information.} --- Wikipedia.
\bigskip
......@@ -48,18 +47,16 @@
\end{itemize}
\item Enables collaboration.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Why should I use it?}
\end{pframe}
\subsection{Why should I use it?}
\begin{pframe}
For a single user:
\begin{itemize}
\item Revert files to a previous state.
\item Revert the entire project back to a previous state.
\item Review changes made over time.
\item Backup.
\item \ldots
\end{itemize}
\bigskip
\pause
......@@ -70,13 +67,11 @@
\item Allow multiple people working on the same project at the same time.
\item Conflict resolution.
\item See who made which changes at which time.
\item \ldots
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Why should I not use it?}
\end{pframe}
\subsection{Why should I not use it?}
\begin{pframe}
A list of common excuses:
\begin{itemize}
\item It is too much work.
......@@ -93,60 +88,53 @@
\begin{itemize}
\item I'm too busy rewriting the code I accidentally deleted.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Local repository.}
\end{pframe}
\subsection{Local repository}
\begin{pframe}
\begin{figure}[]
\begin{center}
\colorbox{white}{
\hspace{0.5cm}
\includegraphics[height=0.8\textheight]{pics/18333fig0101-tn}
\includegraphics[height=0.8\textheight]{18333fig0101-tn}
\hspace{0.5cm}
}
\end{center}
\caption{Local version control diagram.}
\label{}
\end{figure}
\end{frame}
\end{pframe}
\begin{frame}
\frametitle{Central repository.}
\subsection{Central repository}
\begin{pframe}
\begin{figure}[]
\begin{center}
\colorbox{white}{
\hspace{0.5cm}
\includegraphics[height=0.8\textheight]{pics/18333fig0102-tn}
\includegraphics[height=0.8\textheight]{18333fig0102-tn}
\hspace{0.5cm}
}
\end{center}
\caption{Centralised version control diagram.}
\label{}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{Distributed repositories.}
\end{pframe}
\subsection{Distributed repositories}
\begin{pframe}
\begin{figure}[]
\begin{center}
\colorbox{white}{
\hspace{0.5cm}
\includegraphics[height=0.8\textheight]{pics/18333fig0103-tn}
\includegraphics[height=0.8\textheight]{18333fig0103-tn}
\hspace{0.5cm}
}
\end{center}
\caption{Distributed version control diagram.}
\label{}
\end{figure}
\end{frame}
\end{pframe}
\section{Git}
\begin{frame}
\frametitle{The name.}
\subsection{The name}
\begin{pframe}
\emph{Git (n): A person who is deemed to be despicable or contemptible.} ---
WordNet.
\bigskip
......@@ -155,11 +143,10 @@
\emph{I'm an egotistical bastard, and I name all my projects after myself.
First ``Linux'', now ``git''.} --- Linus Torvalds.
\bigskip
\end{frame}
\begin{frame}
\frametitle{History.}
\end{pframe}
\subsection{History}
\begin{pframe}
Designed to replace the commercial package \emph{BitKeeper}.
\begin{itemize}
\item Speed.
......@@ -170,12 +157,11 @@
\item Able to handle large projects like the Linux kernel efficiently
(speed and data size).
\end{itemize}
\end{frame}
\end{pframe}
\section{Remotes}
\begin{fframe}
\frametitle{A lot of choices.}
\subsection{A lot of choices}
\begin{pframe}
GitHub.
\begin{itemize}
\item Only free for open source projects.
......@@ -196,25 +182,30 @@
\vfill
\permfoot{https://github.com/}
\end{fframe}
\end{pframe}
\section{Practical}
\begin{fframe}
\frametitle{Outline.}
\subsection{Outline}
\begin{pframe}
We are going to:
\begin{itemize}
\item Create and configure a user account on the GitLab server.
\item Upload an \bt{ssh-key} to work with Git.
\end{itemize}
\bigskip
Or alternatively, if you can not access the internal network:
\begin{itemize}
\item Use \bt{https} to work with GitLab.
\end{itemize}
\vfill
\permfoot{https://git.lumc.nl/}
\end{fframe}
\end{pframe}
\section{Questions?}
\lastpagetemplate
\begin{fframe}
\begin{pframe}
\begin{center}
Acknowledgements:
\bigskip
......@@ -222,12 +213,12 @@
Martijn Vermaat
Zuotian Tatum
Wibowo Arindrarto
Zuotian Tatum
\end{center}
\vfill
\permfoot{https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/git}
\end{fframe}
\end{pframe}
\end{document}
......@@ -14,7 +14,7 @@ Git Introduction practical.
\end{center}
\bigskip
\subsubsection*{Local configuration.}
\subsubsection*{Local configuration}
First, let Git know what your name and e-mail address is:
\begin{lstlisting}
$ git config --global user.name "<Your Name>"
......@@ -23,6 +23,24 @@ First, let Git know what your name and e-mail address is:
\end{lstlisting}
\bigskip
For the other practicals, it is convenient to have a \texttt{projects} folder
for your repositories:
\begin{lstlisting}
mkdir ~/projects
cd ~/projects
\end{lstlisting}
\newcommand{\generalconfiguration}{
You can now edit your profile by clicking on the ``profile'' button
(pictogram of a torso), located on the top right of your screen. On mouse
over, a text balloon will pop up, saying ``Profile settings''.
\medskip
Check your name and e-mail address (you probably want to change your name).
\bigskip
}
\subsubsection*{Remote configuration for LUMC participants}
Check whether you have an ssh key:
\begin{lstlisting}
$ cat ~/.ssh/id_rsa.pub
......@@ -37,26 +55,46 @@ If not, make one:
Enter same passphrase again:
\end{lstlisting}
You can leave all fields blank.
\bigskip
\subsubsection*{Remote configuration.}
Open \texttt{https://git.lumc.nl} in your browser.
\bigskip
\medskip
In the authentication form, use your LUMC username and password (LDAP login).
\bigskip
You can now edit your profile by clicking on the ``profile'' button (pictogram
of a torso), located on the top right of your screen. On mouse over, a text
balloon will pop up, saying ``My profile''.
\generalconfiguration
To be able to upload new versions, you need to add your ssh key. Open the ``SSH
Keys'' tab and click the ``Add SSH Key'' button.
\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).
\subsubsection*{Remote configuration for other participants}
Open \texttt{https://git.lumc.nl} in your browser.
\bigskip
Check your name and e-mail address (you probably want to change your name).
In the authentication form, use the provided username and password (Standard
login).
\bigskip
To be able to upload new versions, you need to add your ssh key. Click the
``Add Public Key'' button.
\generalconfiguration
Give your key a title (e.g., ``Course Laptop'').
Open \texttt{https://git.lumc.nl/humgen/gitcourse} in your browser.
\bigskip
Copy your ssh key to the key field (see the \texttt{cat} command above).
On the right, you see a text box containing the string
\texttt{git@git.lumc.nl:humgen/gitcourse.git}, notice the ``SSH'' button is
selected. During the course we will ask you to use this protocol (ssh) for
remote repositories. Since we do not have access to the LUMC using this
protocol, we are going to use an other protocol.
\bigskip
Click the ``HTTPS'' button, and you will see the string
\texttt{https://git.lumc.nl/humgen/gitcourse.git}. We can use this protocol
(https) for remote repositories.
\end{document}
../pics/
\ No newline at end of file
......@@ -2,7 +2,7 @@
\title{Analysis projects skeleton}
\providecommand{\myConference}{Git course}
\providecommand{\myDate}{Monday, October 14, 2013}
\providecommand{\myDate}{Monday, June 23, 2014}
\author{Jeroen F. J. Laros}
\providecommand{\myGroup}{Leiden Genome Technology Center}
\providecommand{\myDepartment}{Department of Human Genetics}
......@@ -31,9 +31,8 @@
% First page of the presentation.
\section{Introduction}
\begin{frame}
\frametitle{Shared projects.}
\subsection{Shared projects}
\begin{pframe}
Most of us work on multiple projects with multiple people.
\bigskip
......@@ -48,12 +47,11 @@
\pause
\item Have the same structure for all projects.
\end{itemize}
\end{frame}
\end{pframe}
\section{Starting a project}
\begin{fframe}
\frametitle{Project skeleton.}
\subsection{Project skeleton}
\begin{pframe}
Usage:
\begin{itemize}
\item Make a \emph{fork} (copy) of the skeleton project.
......@@ -76,11 +74,10 @@
\vfill
\permfoot{https://git.lumc.nl/lgtc-bioinformatics/project-skeleton}
\end{fframe}
\end{pframe}
%\begin{fframe}
% \frametitle{Forking}
%
%\subsection{Forking}
%\begin{pframe}
% Make a new analysis project.
% \begin{itemize}
% \item Go to the ``Project skeleton'' project page on our GitLab server.
......@@ -93,11 +90,10 @@
%
% \vfill
% \permfoot{https://git.lumc.nl/lgtc-bioinformatics/project-skeleton}
%\end{fframe}
%\end{pframe}
%\begin{frame}
% \frametitle{Configuration}
%
%\subsection{Configuration}
%\begin{pframe}
% Configure your project.
% \begin{itemize}
% \item Choose to make your project public or not.
......@@ -107,12 +103,11 @@
% \end{itemize}
% \item Add the people that work on this project.
% \end{itemize}
%\end{frame}
%\end{pframe}
\section{Project structure}
\begin{frame}
\frametitle{Global overview.}
\subsection{Global overview}
\begin{pframe}
Project layout:
\begin{itemize}
\item analysis
......@@ -123,22 +118,20 @@
\bigskip
Ideally, every directory in the project has a \bt{README} file.
\end{frame}
\begin{frame}
\frametitle{The toplevel \bt{\,README\,\,} file.}
\end{pframe}
\subsection{The toplevel ``README'' file}
\begin{pframe}
This file contains general information about the project, for example:
\begin{itemize}
\item Who leads the project.
\item Who participates in the project.
\item The amount of hours people have spent on this project.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{The \bt{\,doc\,\,} directory.}
\end{pframe}
\subsection{The ``doc'' directory}
\begin{pframe}
Documentation on the project:
\begin{itemize}
\item Annotation of the data.
......@@ -148,11 +141,10 @@
\item You may want to note who provided the documentation.
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{The \bt{\,data\,\,} directory.}
\end{pframe}
\subsection{The ``data'' directory}
\begin{pframe}
Used to store all raw data.
\bigskip
......@@ -176,11 +168,10 @@
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{The \bt{\,analysis\,\,} directory.}
\end{pframe}
\subsection{The ``analysis'' directory}
\begin{pframe}
All analysis related files are stored here:
\begin{itemize}
\item Run scripts.
......@@ -195,22 +186,20 @@
\item Normal data analysis.
\item $k$-mer analysis.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{The \bt{\,src\,\,} directory.}
\end{pframe}
\subsection{The ``src'' directory}
\begin{pframe}
Any custom scripts and specific software versions for this project.
\bigskip
When these scripts are useful for other projects, move them to their own
repository.
\end{frame}
\end{pframe}
\section{Working with large files}
\begin{fframe}
\frametitle{Git is not designed for massive files.}
\subsection{Git is not designed for massive files}
\begin{pframe}
Some problems with large files:
\begin{itemize}
\item Limited storage on the server.
......@@ -231,11 +220,10 @@
\vfill
\permfoot{http://git-annex.branchable.com/}
\end{fframe}
\begin{frame}[fragile]
\frametitle{Git annex.}
\end{pframe}
\subsection{Git annex}
\begin{pframe}
Manage files with git, without checking their contents in.
\begin{itemize}
\item Manage large files without storing them.
......@@ -251,11 +239,10 @@
\begin{lstlisting}[language=none, caption=Enable git-annex.]
$ git annex init "<name>"
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Adding big files.}
\end{pframe}
\subsection{Adding big files}
\begin{pframe}
In our master repository, we annex a file.
\bigskip
......@@ -274,11 +261,10 @@
<filename>: broken symbolic link to ...
$ git annex get <filename>
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Removing files.}
\end{pframe}
\subsection{Removing files}
\begin{pframe}
As long as there are enough copies available, you can remove files.
\bigskip
......@@ -297,11 +283,10 @@
$ rm -rf <repository>
rm: cannot remove <repository>/.git/annex/objects/...
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Synchronise your results.}
\end{pframe}
\subsection{Synchronise your results}
\begin{pframe}
Let the other repositories know what you have done.
\bigskip
......@@ -317,11 +302,10 @@
\begin{lstlisting}[language=none, caption=Synchronise with a selection.]
$ git annex sync origin
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Working together on the same clone.}
\end{pframe}
\subsection{Working together on the same clone}
\begin{pframe}
Sometimes you need to work with other people on the same repository clone.
\begin{itemize}
\item Where the large files are stored.
......@@ -335,11 +319,11 @@
$ find -type d -exec chmod 775 {} \;
$ find -type f -exec chmod 664 {} \;
\end{lstlisting}
\end{frame}
\end{pframe}
\section{Questions?}
\lastpagetemplate
\begin{fframe}
\begin{pframe}
\begin{center}
Acknowledgements:
\bigskip
......@@ -353,7 +337,7 @@
\vfill
\permfoot{http://git-annex.branchable.com/}
\permfoot{https://git.lumc.nl/lgtc-bioinformatics/project-skeleton}
\end{fframe}
\permfoot{https://git.lumc.nl/lgtc-bioinformatics/project-skeleton}
\end{pframe}
\end{document}
.trac_config
{"username": "jfjlaros", "info": {"git": [15, "e7cdcdf9234d9e40e42159594b5ba041"]}, "protocol": "https", "location": "humgenprojects.lumc.nl/trac/humgenprojects"}
\ No newline at end of file
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment