Skip to content

Commit bde874c

Browse files
committed
Start converting slides
1 parent b546e9a commit bde874c

15 files changed

Lines changed: 467 additions & 175 deletions

CITATION.cff

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@
55
# ensuring that the author list and other fields remain accurate.
66

77
cff-version: 1.2.0
8-
title: FIXME
8+
title: Introduction to Version Control with Git and GitHub
99
message: >-
1010
Please cite this lesson using the information in this file
1111
when you refer to it in publications, and/or if you
1212
re-use, adapt, or expand on the content in your own
1313
training material.
1414
type: dataset
1515
authors:
16-
- given-names: FIXME
17-
family-names: FIXME
16+
- family-names: Hill
17+
given-names: Peter Alec
18+
orcid: https://orcid.org/0000-0003-3092-1858
19+
affiliation: University of York
20+
1821
abstract: >-
19-
FIXME Replace this with a short abstract describing the
20-
lesson, e.g. its target audience and main intended
21-
learning objectives.
22-
license: CC-BY-4.0
22+
A beginner's introduction to version control, walking through the basics of
23+
setting up a git repository, making changes, undoing changes, and working with
24+
others.
25+
license: CC-BY-SA-4.0

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1-
## intro-to-version-control
1+
## Introduction to Version Control with Git and GitHub
22

3-
This is the lesson repository for intro-to-version-control
3+
This lesson uses [The Carpentries Workbench][workbench] template.
4+
5+
### Build the lesson locally
6+
7+
To render the lesson locally, you will need to have [R][r] installed.
8+
Instructions for using R with the Carpentries template is available on the
9+
[Carpentries website](https://carpentries.github.io/workbench/#installation).
10+
We recommend using the
11+
[`{renv}`](https://rstudio.github.io/renv/articles/renv.html) package.
12+
13+
After cloning the repository, you can set up `renv` and install all packages with:
14+
15+
``` r
16+
renv::init()
17+
# Optionally update packages
18+
renv::update()
19+
```
20+
21+
Once you have installed the dependencies, you can render the pages locally by
22+
starting R in the project root and running:
23+
24+
``` r
25+
sandpaper::serve()
26+
```
27+
28+
When building the site subsequently, you may need to run `renv::activate()` first.
29+
30+
This will build the pages and start a local web-server in R and open it in your
31+
browser. These pages are "live" and will respond to local file changes if you
32+
save them.
33+
34+
35+
[git]: https://git-scm.com
36+
[r]: https://www.r-project.org/
37+
[workbench]: https://carpentries.github.io/workbench/

config.yaml

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,56 +17,37 @@ carpentry: 'incubator'
1717
# carpentry_description: "Custom Carpentry"
1818

1919
# Overall title for pages.
20-
title: 'Lesson Title'
20+
title: 'Introduction to Version Control with Git and GitHub'
2121

2222
# Date the lesson was created (YYYY-MM-DD, this is empty by default)
2323
created: '2026-04-29'
2424

2525
# Comma-separated list of keywords for the lesson
26-
keywords: 'software, data, lesson, The Carpentries'
26+
keywords: 'lesson, The Carpentries, version control, git, github, Research Coding Club'
2727

2828
# Life cycle stage of the lesson
2929
# refer to <https://docs.carpentries.org/resources/curriculum/lesson-life-cycle.html> for details
3030
# possible values: pre-alpha, alpha, beta, stable
31-
life_cycle: 'pre-alpha'
31+
life_cycle: 'stable'
3232

3333
# License of the lesson materials (recommended CC-BY 4.0)
34-
license: 'CC-BY 4.0'
34+
license: 'CC-BY-SA 4.0'
3535

3636
# Link to the source repository for this lesson
37-
source: 'https://example.com/template-source/lesson-example'
37+
source: 'https://github.com/ResearchCodingClub/intro-to-version-control'
3838

3939
# Default branch of your lesson
4040
branch: 'main'
4141

4242
# Who to contact if there are any issues
43-
contact: 'team@carpentries.org'
43+
contact: 'peter.hill@york.ac.uk'
4444

4545
# Navigation ------------------------------------------------
4646
#
47-
# Use the following menu items to specify the order of
48-
# individual pages in each dropdown section. Leave blank to
49-
# include all pages in the folder.
50-
#
51-
# Example -------------
52-
#
53-
# episodes:
54-
# - introduction.md
55-
# - first-steps.md
56-
#
57-
# learners:
58-
# - setup.md
59-
#
60-
# instructors:
61-
# - instructor-notes.md
62-
#
63-
# profiles:
64-
# - one-learner.md
65-
# - another-learner.md
66-
6747
# Order of episodes in your lesson
6848
episodes:
69-
- introduction.Rmd
49+
- 00-introduction.md
50+
- 01-basics.md
7051

7152
# Information for Learners
7253
learners:
@@ -81,5 +62,5 @@ profiles:
8162
#
8263
# This space below is where custom yaml items (e.g. pinning
8364
# sandpaper and varnish versions) should live
84-
85-
65+
varnish: ResearchCodingClub/uoy-varnish@main
66+
url: 'https://researchcodingclub.github.io/intro-to-version-control/'

episodes/00-introduction.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: 'Introduction'
3+
teaching: 10
4+
exercises: 2
5+
---
6+
7+
:::::::::::::::::::::::::::::::::::::: questions
8+
9+
- What are the goals of this course?
10+
11+
::::::::::::::::::::::::::::::::::::::::::::::::
12+
13+
::::::::::::::::::::::::::::::::::::: objectives
14+
15+
- To understand the learning outcomees of this course
16+
- To understand the structure of the practicals
17+
18+
::::::::::::::::::::::::::::::::::::::::::::::::
19+
20+
# What is Version Control?
21+
22+
Any means by which you track changes to something:
23+
24+
![Is this effective version
25+
control?](fig/ineffective_version_control.png){alt="Four Python files named:
26+
work.py, work_final.py, work_final_2.py, work_final_2_really_final.py"}
27+
28+
## What is Version Control?
29+
30+
- Structured way of keeping track of changes to files
31+
- Implemented in different \"version control systems\" (VCS)
32+
- Typically share the concept of a history, the changes which make up the history , and the ability to move freely back and forth within the history
33+
- The most popular VCS is git , which we will be focusing on today
34+
35+
## Why Version Control?
36+
37+
- Keeps a labelled history of all changes made to a project, and lets you rewind them if something goes wrong
38+
- Lets you experiment with changes to a project whilst keeping stable versions of the project untouched
39+
- Provides lots of convenience features for working with other people on a project
40+
- Can act as a backup of your projects, especially when using a hosted service like GitHub
41+
- Many tools (like IDEs) have git integrations
42+
43+
## What is git?
44+
45+
- A specific version control system, created by the guy who created the Linux kernel (the myth goes that he named it by his personal reputation)
46+
- A \"distributed\" version control system - many people can have copies of the stuff under version control and they don't need to all be in sync
47+
- One of the most important programming tools you can benefit from becoming comfortable with
48+
49+
![](fig/git_logo.png){alt="Git logo"}
50+
51+
## What is GitHub?
52+
53+
- A service for hosting, organising, and collaborating on projects that are under version control
54+
55+
<!-- -->
56+
57+
- Other git services are available
58+
59+
<!-- -->
60+
61+
- Provides a consistent way to store and share version-controlled projects
62+
- Can act as a portfolio of sorts
63+
- Has a whole host of other features (project management, continuous integration, etc.)
64+
- See the PlasmaFAIR GitHub organisation for an example
65+
66+
![](fig/github_logo.png){alt="GitHub logo"}
67+
68+
## Git Glossary: Basics
69+
70+
- Repository (repo) : a project under version control
71+
- History : timeline of changes to your repo
72+
- Clone : make a local copy of a repo, including its history
73+
- Commit : a labelled set of specific change to files in your repo
74+
- Push / pull : synchronise history with another copy of your repo
75+
- Working tree : the current state of your project and files on disk
76+
- Track : keep under version control

0 commit comments

Comments
 (0)