Skip to content

Commit 519e4f3

Browse files
committed
small updates in episodes
1 parent 83c5c47 commit 519e4f3

File tree

3 files changed

+26
-32
lines changed

3 files changed

+26
-32
lines changed

content/archaeology.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GitHub.
2222
* The **GitHub** web interface allows many things to be done, but not
2323
everything.
2424
* **VS Code** allows some of these, but for some it's easier to open
25-
the VS Code terminal and run git there.
25+
the VS Code terminal and run Git there.
2626

2727

2828
## Our toolbox for history inspection
@@ -200,8 +200,7 @@ modified each line. Incredibly useful for reproducibility.
200200

201201
:::::
202202

203-
:::{discussion}
204-
Discuss how these relatively trivial changes affect the annotation:
203+
:::{discussion} Discuss how these relatively trivial changes affect the annotation
205204
- Wrapping long lines of text/code into shorter lines
206205
- Auto-formatting tools such as `black`
207206
- Editors that automatically remove trailing whitespace
@@ -221,17 +220,17 @@ Discuss how these relatively trivial changes affect the annotation:
221220

222221
Example (lines starting with "#" are only comments):
223222

224-
```console
225-
$ # create branch called "older-code" from hash 347e6292419b
223+
```bash
224+
# create branch called "older-code" from hash 347e6292419b
226225
$ git switch --create older-code 347e6292419bd0e4bff077fe971f983932d7a0e9
227226

228-
$ # now you can navigate and inspect the code as it was back then
229-
$ # ...
227+
# now you can navigate and inspect the code as it was back then
228+
# ...
230229

231-
$ # after we are done we can switch back to "main"
230+
# after we are done we can switch back to "main"
232231
$ git switch main
233232

234-
$ # if we like we can delete the "older-code" branch
233+
# if we like we can delete the "older-code" branch
235234
$ git branch -d older-code
236235
```
237236

@@ -272,9 +271,6 @@ Discuss how these relatively trivial changes affect the annotation:
272271

273272
## Exercise
274273

275-
This is described with the command line method, but by looking above
276-
you can translate to the other options.
277-
278274
:::::{exercise} Exercise: Explore basic archaeology commands (20 min)
279275
Let us explore the value of these commands in an exercise. Future
280276
exercises do not depend on this, so it is OK if you do not complete
@@ -375,7 +371,7 @@ you can translate to the other options.
375371
Then using the above toolbox try to:
376372
1. Find the code line which contains `"Logic error in degree_correlation"`.
377373
1. Find out when this line was last modified or added. Find the actual commit which modified that line.
378-
1. Inspect that commit with `git show`.
374+
1. Inspect the commit. What is the commit change? What is the commit metadata?
379375
1. Create a branch pointing to the past when that commit was created to be
380376
able to browse and use the code as it was back then.
381377
1. How would you bring the code to the version of the code right before that line was last modified?
@@ -422,13 +418,11 @@ you can translate to the other options.
422418

423419
## Finding out when something broke/changed with `git bisect`
424420

425-
This only works with the command line.
426-
427-
> *"But I am sure it used to work! Strange."*
421+
This section only works with the command line.
428422

429-
Sometimes you realize that something broke.
430-
You know that it used to work.
431-
You do not know when it broke.
423+
*"But I am sure it used to work! Strange."* - Sometimes you realize that
424+
something broke. You know that it used to work. You do not know **when precisely** it
425+
broke.
432426

433427
:::{discussion} How would you solve this?
434428
Before we go on first discuss how you would solve this problem: You know that it worked
@@ -467,7 +461,7 @@ We will probably arrive at a solution which is similar to `git bisect`:
467461

468462
This only works with the command line.
469463

470-
::::{exercise} (optional) History-2: Use git bisect to find the bad commit
464+
::::{exercise} (optional) Use git bisect to find the bad commit
471465
In this exercise, we use `git bisect` on an example repository. It
472466
is OK if you do not complete this exercise fully.
473467

content/local-workflow.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ do, so now we move to working on your own computer.
66

77
:::{objectives}
88
- We are able to clone a repository from the web and modify it locally.
9-
- We can do the same things we did before (commit, branch, merge), but locally.
9+
- We can do the same things we did before (commit, branch, merge), but **locally**.
1010
- We get a feeling for remote repositories ([more later](https://coderefinery.github.io/git-collaborative/)).
1111
:::
1212

@@ -29,7 +29,7 @@ do, so now we move to working on your own computer.
2929

3030
**Cloning**:
3131
- Copying (downloading) the entire repository with all commits, branches, and tags to your computer.
32-
- It is a full backup of the repository, including all history.
32+
- It is a **full backup** of the repository, including all history.
3333
- You can then work on your local clone of the repository.
3434
- Changes on local clone will not automatically appear in the repository where
3535
we cloned from. We have to actively "push" them there (we will practice this
@@ -82,7 +82,7 @@ since we don't plan to push changes back (for step 8 it might be easier to use t
8282
- Or first fork the original repository and then clone your fork.
8383

8484
The examples below assume you are cloning the original repository. If you are cloning your fork, you should
85-
replace `coderefinery` with your GitHub username.
85+
replace `cr-workshop-exercises` with your GitHub username.
8686

8787
:::::::{tabs}
8888
::::::{group-tab} Command line
@@ -234,7 +234,7 @@ Committing a new file in VS Code.
234234

235235
1. One creates the file in the normal way,
236236
1. In the git tab, one uses the checkbox under "Staged" to add mark the file as {term}`staged <staging area>`, which means it will be committed next.
237-
1. Click the checkmarks to commit. A new window will be opened.
237+
1. Click the check-mark to commit. A new window will be opened.
238238

239239
:::{figure} img/commits/rstudio-committing.png
240240
:alt: Screenshot of RStudio commit process

content/merging.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ means that we have to somehow combine the changes later. In this part we will
66
practice this: {term}`merging`.
77

88
:::{objectives}
9-
- Understand that on GitHub merging is done through a {term}`pull request`. Think of it as a change proposal.
9+
- Understand that on GitHub merging is done through a {term}`pull request`. Think of it as a **change proposal**.
1010
- Create and merge a pull request within your own repository.
1111
- Understand (and optionally) do the same across repositories, to contribute to
1212
the {term}`upstream` public repository.
@@ -25,7 +25,7 @@ practice this: {term}`merging`.
2525
us to test it before it becomes "live".
2626
* Now, we want to bring that change into the "main" branch.
2727
* We will find it's not that hard! But you do have to keep track of the
28-
steps and make sure that you work very precisely.
28+
steps and make sure that you are careful about where a change is added.
2929

3030

3131
## Exercise
@@ -50,22 +50,22 @@ review and commenting before the actual merge.
5050
:::{exercise} Exercise: Merging branches with pull requests (20 min)
5151
We assume that in the previous exercise you have created a new branch
5252
with a recipe. In our previous example, it is called `new-recipe`.
53-
If not, create it first and add a recipe to your new branch, see
53+
If not, create the branch first and add a recipe to your new branch, see
5454
{doc}`commits`.
5555

5656
We provide basic hints. You should refer to the solution as needed.
5757

5858
1. Navigate to your branch from the previous episode
59-
(Hint: the same branch view we used last time).
59+
(hint: the same branch view we used last time).
6060

61-
1. Begin the pull request process.
62-
(Hint: There is a "Contribute" button in the branch view).
61+
1. Begin the pull request process
62+
(hint: There is a "Contribute" button in the branch view).
6363

6464
1. Add or modify the pull request title and description, and verify the other data.
6565
In the pull request verify the target repository and the target
6666
branch. Make sure that you are merging within your own repository.
6767
**GitHub: By default, it will offer to make the change to the
68-
upstream repository, `coderefinery`. You should change this**, you
68+
upstream repository, `cr-workshop-exercises`. You should change this**, you
6969
shouldn't contribute your test recipe upstream yet. Where it says
7070
`base repository`, select your own user's repository.
7171

@@ -77,7 +77,7 @@ We provide basic hints. You should refer to the solution as needed.
7777

7878
1. Find out which branches are merged and thus safe to delete. Then remove them
7979
and verify that the commits are still there, only the branch labels are
80-
gone. (Hint: you can delete branches that have been merged into `main`).
80+
gone (hint: you can delete branches that have been merged into `main`).
8181

8282
1. Optional: Try to create a new branch with a new change, then open a pull
8383
request but towards the central repository. We will later merge few of

0 commit comments

Comments
 (0)