-
Notifications
You must be signed in to change notification settings - Fork 0
/
vc_slides.Rmd
151 lines (127 loc) · 4.61 KB
/
vc_slides.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
title: "Version control for reproducible science"
author: "Brad Duthie"
date: "4 December 2019"
output:
beamer_presentation: default
header-includes:
- \usepackage{hyperref}
colorlinks: true
linkcolor: blue
urlcolor: blue
---
## What version control software does
\begin{itemize}
\setlength\itemsep{1em}
\item Software that records changes you make to files over time
\begin{itemize}
\item Manage different {\it versions} of files
\item Recover old files, keep track of file changes
\item Collaborate with others on shared files
\end{itemize}
\end{itemize} \pause
\vspace{6 mm}
\hrule
\vspace{6 mm}
\begin{itemize}
\setlength\itemsep{1em}
\item {\bf Put more intuitively}, version control takes a snapshot in time (called a '{\bf commit}') of all the files in one of your folders (called '{\bf repositories}')
\begin{itemize}
\item Visualise changes to your files over time
\item Look at the differences between file versions
\item Record who changed files, and what they changed
\end{itemize}
\end{itemize}
## Version control makes science easier
\begin{itemize}
\setlength\itemsep{1em}
\item Organise files and avoid having to 'save as' multiple versions
\begin{itemize}
\item analysis\_1.R
\item analysis\_2.R
\item analysis\_FINAL.R
\item analysis\_FINAL\_no\_really\_this\_time.R
\end{itemize} \pause
\item Have a clear history of what you have done, when, and why (through commit comments)
\item Never worry about losing your data, analysis, or writing when integrating with \href{http://github.com}{GitHub}
\end{itemize}
## Version control can help open science
\begin{columns}
\begin{column}{0.35\textwidth}
\begin{center}
\begin{itemize}
\item[] \includegraphics[width=70px]{images/github_logo.png} \vspace{5 mm}
\item[] \includegraphics[width=70px]{images/gitlab.png} \vspace{5 mm}
\end{itemize}
\end{center}
\end{column}
\begin{column}{0.65\textwidth}
\begin{itemize}
\setlength\itemsep{1em}
\item Transparent record of data collection, analysis, and writing
\item Record publicly available on \href{http://github.com}{GitHub}, \href{http://bitbucket.org}{Bitbucket}, or \href{http://gitlab.com}{GitLab}
\item GitHub repository can be copied, reproduced, and discussed
\item \href{https://git-scm.com/}{git} and GitHub can track individual contributions to a project
\end{itemize}
\end{column}
\end{columns}
## Most researchers use git (and GitHub)
\begin{columns}
\begin{column}{0.35\textwidth}
\begin{center}
\begin{itemize}
\item[] \includegraphics[width=70px]{images/git.png}
\end{itemize}
\end{center}
\end{column}
\begin{column}{0.65\textwidth}
\begin{itemize}
\setlength\itemsep{1em}
\item Free and open-source
\item Separate from \href{http://github.com}{GitHub} \pause
\item Works across platforms
\begin{itemize}
\item Windows
\item Linux
\item Mac
\end{itemize}
\item Invented by \href{https://en.wikipedia.org/wiki/Linus_Torvalds}{Linus Torvalds}
\end{itemize}
\end{column}
\end{columns}
## Objectives: using version control
\textbf{By the end of today you will be able to use git with \href{http://github.com}{GitHub} and \href{http://gitkraken.com}{GitKraken} to manage your projects with version control.} \pause
\begin{itemize}
\setlength\itemsep{1em}
\item Understand key concepts of version control
\item Perform basic tasks in GitHub and GitKraken
\begin{itemize}
\item Staging and committing files
\item Pushing to and pulling from GitHub
\item Branching, merging, \& resolving merge conflicts
\end{itemize}
\end{itemize} \pause
\textbf{Discuss, share, and get additional help by \href{https://github.com/StirlingCodingClub/version_control/issues}{raising an issue} in the \href{https://github.com/StirlingCodingClub/version_control}{version\_control repository} on the \href{https://github.com/StirlingCodingClub}{Stirling Coding Club} GitHub organisation.}
## Why focus on using GitKraken?
\begin{columns}
\begin{column}{0.45\textwidth}
\begin{center}
\begin{itemize}
\item[] \includegraphics[width=100px]{images/gitkraken.png}
\end{itemize}
\end{center}
\end{column}
\begin{column}{0.55\textwidth}
\begin{itemize}
\setlength\itemsep{1em}
\item Free to download and use
\item Easy GitHub integration
\item Graphical user interface
\item Visualisation of repository
\end{itemize}
\end{column}
\end{columns}
\vspace{8mm}
\hrule
\vspace{2mm}
\textbf{\href{https://stirlingcodingclub.github.io/version_control/vc_notes.html}{Accompanying notes to these slides} are available in the \href{https://github.com/StirlingCodingClub/version_control}{version\_control} repository, and include instructions for using the command line interface, and for editing directly in GitHub.}