-
Notifications
You must be signed in to change notification settings - Fork 0
/
vc_presentation.Rmd
168 lines (125 loc) · 4.18 KB
/
vc_presentation.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
---
title: "Version control for reproducible science"
author: "Brad Duthie"
date: "4 December 2019"
output:
beamer_presentation: default
ioslides_presentation:
logo: images/SCC_Logo_slide_sm.png
---
<style type="text/css">
body p {
color: #000000;
}
ul {
color: black;
}
ol {
color: black;
}
a {
color: darkblue;
text-decoration: none
}
.fifty {
font-size: 50%;
}
.seventy {
font-size: 70%;
}
slides > slide.backdrop {
background: none !important;
background-color: white !important;
}
slides > slide.title-slide hgroup h1 {
color: black;
}
slides > slide.title-slide p {
color: black;
}
slides > slide.light > hgroup h2 {
color: black;
}
slides > slide.light > hgroup h1 {
color: black;
}
ul {
color: black;
}
ol {
color: black;
}
p {
color: black
}
h1, h2, h3, h4, h5, h6, h7, h8, p {
color: black;
}
</style>
## What version control software does
- Software that records changes you make to files over time
- Manage different *versions* of files
- Recover old files, keep track of file changes
- Collaborate with others on shared files
<hr>
## What version control software does
- Software that records changes you make to files over time
- Manage different *versions* of files
- Recover old files, keep track of file changes
- Collaborate with others on shared files
<hr>
- **Put more intuitively**, version control takes a snapshot in time (called a '*commit*') of all the files in one of your folders (called '*repositories*')
- Visualise changes to your files over time
- Look at the differences between file versions
- Record who changed files, and what they changed
## Version control makes science easier
- Organise files and avoid having to 'save as' multiple versions
- *analysis_1.R*
- *analysis_2.R*
- *analysis_FINAL.R*
- *analysis_FINAL_no_really_this_time.R*
<br>
- Have a clear history of what you have done, when, and why (through commit comments)
- Never worry about losing your data, analysis, or writing when integrating with [GitHub](http://github.com)
## Version control can help open science
- Transparent record of data collection, analysis, and writing
- Record publicly available on [GitHub](http://github.com), [Bitbucket](http://bitbucket.org), or [GitLab](http://gitlab.com)
<div class="columns-2" style="margin-top:30px; margin-bottom:30px; margin-left:40px">
![](images/github_logo.png)
![](images/gitlab.png)
</div>
- GitHub repository can be copied, reproduced, and discussed
- [git](https://git-scm.com/) and GitHub can track individual contributions to a project
## Most researchers use git (and GitHub)
<br>
<div class="columns-2">
- Free and open-source
- Separate from [GitHub](http://github.com)
- Works across platforms
- Windows
- Linux
- Mac
- Invented by [Linus Torvalds](https://en.wikipedia.org/wiki/Linus_Torvalds)
<br>
![](images/git.png)
</div>
## Objectives: using version control
**By the end of today you will be able to use git with [GitHub](http://github.com) and [GitKraken](http://gitkraken.com) to manage your projects with version control**
- Understand key concepts of version control
- Perform basic tasks in GitHub and GitKraken
- Staging and committing files
- Pushing to and pulling from GitHub
- Branching, merging, & resolving merge conflicts
**Discuss, share, and get additional help by [raising an issue](https://github.com/StirlingCodingClub/version_control/issues) in the [version_control repository](https://github.com/StirlingCodingClub/version_control) on the [Stirling Coding Club](https://github.com/StirlingCodingClub) GitHub organisation.**
## Why focus on using GitKraken?
<br>
<div class="columns-2" style="margin-left:40px; margin-right:20px">
![](images/gitkraken.png)
- Free to download and use
- Easy GitHub integration
- Graphical user interface
- Visualisation of repository
</div>
<br>
<hr>
**[Accompanying notes to these slides](https://stirlingcodingclub.github.io/version_control/vc_notes.html) are available in the [version_control](https://github.com/StirlingCodingClub/version_control) repository, and include instructions for using the command line interface, and for editing directly in GitHub.**