Skip to content

Commit 231fb97

Browse files
committed
🥑-ise the lesson: from planets to recipes
Migrated old changes made to the styles lesson but as sandpaper This includes the changes done to: 5c3f297 ca6d833 376bc11
1 parent 286dacd commit 231fb97

16 files changed

+636
-553
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
[![Create a Slack Account with us](https://img.shields.io/badge/Create_Slack_Account-The_Carpentries-071159.svg)](https://swc-slack-invite.herokuapp.com/)
22
[![Slack Status](https://img.shields.io/badge/Slack_Channel-swc--git-E01563.svg)](https://swcarpentry.slack.com/messages/C91JS49HD)
33

4-
# git-novice
4+
# # UCL's git-novice
55

6-
An introduction to version control for novices using Git.
7-
Please see [https://swcarpentry.github.io/git-novice/](https://swcarpentry.github.io/git-novice/) for a rendered version of this material,
6+
An introduction to version control for novices using Git (with the UCL's twist).
7+
Please see [the rendered version of this material](https://github-pages.ucl.ac.uk/git-novice/),
88
[the lesson template documentation][lesson-example]
99
for instructions on formatting, building, and submitting material,
1010
or run `make` in this directory for a list of helpful commands.
1111

12-
Maintainers:
12+
## Maintainers:
13+
14+
## Upstream
1315

1416
- [Nima Hejazi][hejazi_nima]: [@nhejazi](https://github.com/nhejazi)
1517
- [Kat Koziar][koziar_kat]: [@kekoziar](https://github.com/kekoziar)
@@ -20,6 +22,10 @@ Alumni maintainers:
2022
- [Ivan Gonzalez][gonzalez_ivan]: [@iglpdc](https://github.com/iglpdc)
2123
- [Daisie Huang][huang_daisie]: [@daisieh](https://github.com/daisieh)
2224

25+
## UCL's
26+
27+
- David Pérez-Suárez [@dpshelio](https://github.com/dpshelio)
28+
2329
[lesson-example]: https://swcarpentry.github.io/lesson-example
2430
[hejazi_nima]: https://carpentries.org/instructors/#nhejazi
2531
[koziar_kat]: https://carpentries.org/instructors/#kekoziar

episodes/02-setup.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ of configurations we will set as we get started with Git:
2727

2828
On a command line, Git commands are written as `git verb options`,
2929
where `verb` is what we actually want to do and `options` is additional optional information which may be needed for the `verb`. So here is how
30-
Dracula sets up his new laptop:
30+
Alfredo sets up his new laptop:
3131

3232
```bash
33-
$ git config --global user.name "Vlad Dracula"
34-
$ git config --global user.email "[email protected]"
33+
$ git config --global user.name "Alfredo Linguini"
34+
$ git config --global user.email "[email protected]"
3535
```
3636

37-
Please use your own name and email address instead of Dracula's. This user name and email will be associated with your subsequent Git activity,
37+
Please use your own name and email address instead of Alfredo's. This user name and email will be associated with your subsequent Git activity,
3838
which means that any changes pushed to
3939
[GitHub](https://github.com/),
4040
[BitBucket](https://bitbucket.org/),
@@ -79,12 +79,12 @@ $ git config --global core.autocrlf input
7979
And on Windows:
8080

8181
```bash
82-
$ git config --global core.autocrlf false
82+
$ git config --global core.autocrlf true
8383
```
8484

8585
::::::::::::::::::::::::::::::::::::::::::::::::::
8686

87-
Dracula also has to set his favorite text editor, following this table:
87+
Alfredo also has to set his favorite text editor, following this table:
8888

8989
| Editor | Configuration command |
9090
| :----------- | :------------------------------ |
@@ -118,7 +118,7 @@ If you want to save your changes and quit, press <kbd>Esc</kbd> then type `:wq`
118118
::::::::::::::::::::::::::::::::::::::::::::::::::
119119

120120
Git (2.28+) allows configuration of the name of the branch created when you
121-
initialize any new repository. Dracula decides to use that feature to set it to `main` so
121+
initialize any new repository. Alfredo decides to use that feature to set it to `main` so
122122
it matches the cloud service he will eventually use.
123123

124124
```bash

episodes/03-create.md

+30-45
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,17 @@ exercises: 0
2020
Once Git is configured,
2121
we can start using it.
2222

23-
We will continue with the story of Wolfman and Dracula who are investigating if it
24-
is possible to send a planetary lander to Mars.
25-
26-
![](fig/motivatingexample.png){alt='motivatingexample'}
27-
[Werewolf vs dracula](https://www.deviantart.com/b-maze/art/Werewolf-vs-Dracula-124893530)
28-
by [b-maze](https://www.deviantart.com/b-maze) / [Deviant Art](https://www.deviantart.com/).
29-
[Mars](https://en.wikipedia.org/wiki/File:OSIRIS_Mars_true_color.jpg) by European Space Agency /
30-
[CC-BY-SA 3.0 IGO](https://creativecommons.org/licenses/by/3.0/deed.en).
31-
[Pluto](https://commons.wikimedia.org/wiki/File:PIA19873-Pluto-NewHorizons-FlyingPastImage-20150714-transparent.png) /
32-
Courtesy NASA/JPL-Caltech.
33-
[Mummy](https://commons.wikimedia.org/wiki/File:Mummy_icon_-_Noun_Project_4070.svg)
34-
© Gilad Fried / [The Noun Project](https://thenounproject.com/) /
35-
[CC BY 3.0](https://creativecommons.org/licenses/by/3.0/deed.en).
36-
[Moon](https://commons.wikimedia.org/wiki/File:Lune_ico.png)
37-
© Luc Viatour / [https://lucnix.be](https://lucnix.be/) /
38-
[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/deed.en).
23+
We will help Alfredo with his new project, create a repository with all his recipes.
3924

4025
First, let's create a new directory in the `Desktop` folder for our work and then change the current working directory to the newly created one:
4126

4227
```bash
4328
$ cd ~/Desktop
44-
$ mkdir planets
45-
$ cd planets
29+
$ mkdir recipes
30+
$ cd recipes
4631
```
4732

48-
Then we tell Git to make `planets` a [repository](../learners/reference.md#repository)
33+
Then we tell Git to make `recipes` a [repository](../learners/reference.md#repository)
4934
\-- a place where Git can store versions of our files:
5035

5136
```bash
@@ -54,9 +39,9 @@ $ git init
5439

5540
It is important to note that `git init` will create a repository that
5641
can include subdirectories and their files---there is no need to create
57-
separate repositories nested within the `planets` repository, whether
42+
separate repositories nested within the `recipes` repository, whether
5843
subdirectories are present from the beginning or added later. Also, note
59-
that the creation of the `planets` directory and its initialization as a
44+
that the creation of the `recipes` directory and its initialization as a
6045
repository are completely separate processes.
6146

6247
If we use `ls` to show the directory's contents,
@@ -67,7 +52,7 @@ $ ls
6752
```
6853

6954
But if we add the `-a` flag to show everything,
70-
we can see that Git has created a hidden directory within `planets` called `.git`:
55+
we can see that Git has created a hidden directory within `recipes` called `.git`:
7156

7257
```bash
7358
$ ls -a
@@ -117,33 +102,33 @@ wording of the output might be slightly different.
117102

118103
## Places to Create Git Repositories
119104

120-
Along with tracking information about planets (the project we have already created),
121-
Dracula would also like to track information about moons.
122-
Despite Wolfman's concerns, Dracula creates a `moons` project inside his `planets`
105+
Along with tracking information about recipes (the project we have already created),
106+
Alfredo would also like to track information about cocktails.
107+
Despite Jimmy's concerns, Alfredo creates a `cocktails` project inside his `recipes`
123108
project with the following sequence of commands:
124109

125110
```bash
126-
$ cd ~/Desktop # return to Desktop directory
127-
$ cd planets # go into planets directory, which is already a Git repository
128-
$ ls -a # ensure the .git subdirectory is still present in the planets directory
129-
$ mkdir moons # make a subdirectory planets/moons
130-
$ cd moons # go into moons subdirectory
131-
$ git init # make the moons subdirectory a Git repository
132-
$ ls -a # ensure the .git subdirectory is present indicating we have created a new Git repository
111+
$ cd ~/Desktop # return to Desktop directory
112+
$ cd recipes # go into recipes directory, which is already a Git repository
113+
$ ls -a # ensure the .git subdirectory is still present in the recipes directory
114+
$ mkdir cocktails # make a sub-directory recipes/cocktails
115+
$ cd cocktails # go into cocktails subdirectory
116+
$ git init # make the cocktails subdirectory a Git repository
117+
$ ls -a # ensure the .git subdirectory is present indicating we have created a new Git repository
133118
```
134119

135-
Is the `git init` command, run inside the `moons` subdirectory, required for
136-
tracking files stored in the `moons` subdirectory?
120+
Is the `git init` command, run inside the `cocktails` subdirectory, required for
121+
tracking files stored in the `cocktails` subdirectory?
137122

138123
::::::::::::::: solution
139124

140125
## Solution
141126

142-
No. Dracula does not need to make the `moons` subdirectory a Git repository
143-
because the `planets` repository can track any files, sub-directories, and
144-
subdirectory files under the `planets` directory. Thus, in order to track
145-
all information about moons, Dracula only needed to add the `moons` subdirectory
146-
to the `planets` directory.
127+
No. Alfredo does not need to make the `cocktails` subdirectory a Git repository
128+
because the `recipes` repository will track all files, sub-directories, and
129+
subdirectory files under the `recipes` directory. Thus, in order to track
130+
all information about cocktails, Alfredo only needed to add the `cocktails` subdirectory
131+
to the `recipes` directory.
147132

148133
Additionally, Git repositories can interfere with each other if they are "nested":
149134
the outer repository will try to version-control
@@ -165,9 +150,9 @@ fatal: Not a git repository (or any of the parent directories): .git
165150

166151
## Correcting `git init` Mistakes
167152

168-
Wolfman explains to Dracula how a nested repository is redundant and may cause confusion
169-
down the road. Dracula would like to remove the nested repository. How can Dracula undo
170-
his last `git init` in the `moons` subdirectory?
153+
Jimmy explains to Alfredo how a nested repository is redundant and may cause confusion
154+
down the road. Alfredo would like to remove the nested repository. How can Alfredo undo
155+
his last `git init` in the `cocktails` subdirectory?
171156

172157
::::::::::::::: solution
173158

@@ -190,11 +175,11 @@ becomes another change that we will need to track, as we will see in the next ep
190175
### Solution
191176

192177
Git keeps all of its files in the `.git` directory.
193-
To recover from this little mistake, Dracula can just remove the `.git`
194-
folder in the moons subdirectory by running the following command from inside the `planets` directory:
178+
To recover from this little mistake, Alfredo can just remove the `.git`
179+
folder in the cocktails subdirectory by running the following command from inside the `recipes` directory:
195180

196181
```bash
197-
$ rm -rf moons/.git
182+
$ rm -rf cocktails/.git
198183
```
199184

200185
But be careful! Running this command in the wrong directory will remove

0 commit comments

Comments
 (0)