Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions beyond/Exercise_4_cherry-pick-rebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Both commands take commits that exist in one place and replay them somewhere else.
`git cherry-pick` moves **one** commit; `git rebase` moves **a whole branch**. Both create new
commits with new IDs, which is what makes them powerful and what makes them dangerous.
commits with new IDs, which is what makes them powerful, but also dangerous.

In this exercise you use cherry-pick to rescue a single commit from a branch, then compare
merging and rebasing on the same starting point so you can see the difference in the history.
Expand Down Expand Up @@ -139,8 +139,8 @@ whole difference from `git merge`, which would bring the entire branch.
</details>

> [!WARNING]
> Because the cherry-picked commit has a **new ID**, you should not later merge `cherry_feature`
> into `main`: the same change would arrive a second time, and depending on the content you may
> Because the cherry-picked commit has a **new ID**, you should not merge `cherry_feature`
> into `main` later on: the same change would arrive a second time, and depending on the content you may
> get a conflict for a change that is already there.
>
> Cherry-pick is for salvaging work from a branch you are **abandoning**. If the branch is still
Expand Down
6 changes: 3 additions & 3 deletions beyond/Exercise_6_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ set -e

</details>

**Task 10.** Add a second check of your own as *.git/hooks/pre-commit-nonempty*: reject a commit
whose message would be empty, or write something else useful. Wire it into the dispatcher and
**Task 10.** Add a second check of your own as *.git/hooks/pre-commit-large-files*: reject committing
a large file, or write something else useful. Wire it into the dispatcher and
verify both checks run.

<details><summary>💡 Hint</summary>
Expand Down Expand Up @@ -246,7 +246,7 @@ for file in $(git diff --cached --name-only --diff-filter=ACM); do
done
```

Then add `.git/hooks/pre-commit-nonempty` to the dispatcher and `chmod +x` it.
Then add `.git/hooks/pre-commit-large-files` to the dispatcher and `chmod +x` it.

</details>

Expand Down
2 changes: 1 addition & 1 deletion beyond/Exercise_7_git-lfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ls -lh model_output.nc
**Task 6.** Add and commit it.

> [!NOTE]
> If you kept the large-file check from [Exercise 6](Exercise_6_hooks.md#several), this commit is
> If you kept the large-files check from [Exercise 6](Exercise_6_hooks.md#several), this commit is
> rejected. That hook reads the file straight off disk with `wc -c`, so it sees the real 2 MB
> regardless of what LFS is about to store. The check is asking the wrong question here: not "how
> big is this file" but "how big is what Git will actually commit." Skip it for this one commit
Expand Down
20 changes: 1 addition & 19 deletions beyond/Exercise_8_web-workflow.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Exercise 8 - A full workflow in the web interface
# Exercise 8 - A full workflow in GitHub

> [!NOTE]
> **⏱️ Estimated working time:** 30-40 minutes
Expand Down Expand Up @@ -30,7 +30,6 @@ In this exercise we cover the following:
- [6. Respond to your own review and merge](#merge)
- [7. Keep your fork in sync](#sync)
- [8. Handle a conflict](#conflict)
- [GitHub and GitLab](#gitlab)

## 1. Open an issue <a name="issue"></a>

Expand Down Expand Up @@ -348,23 +347,6 @@ The pull request updates itself and the conflict warning disappears.
If conflict markers are unfamiliar, the beginner course covers them in detail:
[Exercise 6 - Merge conflicts](../beginner/Exercise_6_merge_conflicts.md).

## GitHub and GitLab <a name="gitlab"></a>

C2SM works on both `github.com` and `gitlab.ethz.ch`. Everything you just did transfers; only the
names and the CI file change. **The local Git commands are identical.**

| Concept | GitHub | GitLab |
| --- | --- | --- |
| Proposed change | Pull request (PR) | **Merge request (MR)** |
| Close an issue automatically | `Fixes #12` / `Closes #12` | `Closes #12` |
| CI configuration | `.github/workflows/*.yml` | **`.gitlab-ci.yml`** |
| Sign-off on a change | Approve / request changes | **Approvals**, a required count |
| Static site hosting | GitHub Pages | GitLab Pages |
| Preview of a change | PR preview via an Action | Review Apps |
| Ownership rules | `CODEOWNERS` | `CODEOWNERS` |
| Update a fork | "Sync fork" button or `upstream` remote | `upstream` remote |
| Namespaces | User / organization | User / **group**, nestable |

## Check yourself

- [ ] Why start with an issue rather than going straight to a branch?
Expand Down
100 changes: 70 additions & 30 deletions beyond/schedule.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,76 @@
# Schedule

3/4-day course, 09:30 – 15:00, lunch break 12:30 – 13:30.

> Notes:
> - 2026: restructured from Parts 0-4 + Bonus into two parts (commands, then web workflow).
> - 2026: `git bisect` dropped, `git lfs` added; rebase promoted from bonus into Exercise 4.
> - 2026: exercises rewritten as tasks with optional hints, so they take longer to work through
> than the old copy-paste versions. Watch the timing on Exercises 1 and 4 in particular.
> - 2026: start moved 15 min earlier to 09:15 (end time 15:00 stays fixed), welcome trimmed from
> 10 to 5 min, and the three exercise blocks were extended to absorb the longer task-based
> format. This still falls short of the exercises' own printed time estimates, so Exercises 1,
> 2, 4 and 5 have some of their tasks marked as Bonus (optional, skip if short on time).
> - 2026: the coffee break sits right after Exercise 3, matching the slide deck order (the
> `.gitignore` slides and Exercise 3 come before the break, cherry-pick/rebase/stash/worktree
> after it). The former single "Exercises 3-5" row is split at that point; the '24/'25 timing
> data was only recorded for the combined block, so it doesn't carry over to the split rows.

| Description | Presenter | Extent | Time est. | Time needed ('24, '25, '26) | Start time | End time |
3/4-day course, 09:15 – 15:00, lunch break 12:30 – 13:30.

## 2026

The 2026 edition was restructured, so the older timing data no longer maps onto it (see
[Previous years](#previous-years) for the '23-'25 records and
[What changed in 2026](#what-changed-in-2026) for the reasons).

Slide blocks and exercise blocks are listed separately, so that theory and hands-on time can be
budgeted independently. The **Exercise est.** column repeats the working time printed in each
exercise file: *core tasks* first, *bonus tasks* in brackets. Where the budget is below the core
estimate, the block is expected to be tight - keep an eye on the clock and let the bonus tasks go.

| # | Description | Presenter | Slides | Budget | Exercise est. | Start | End |
| --- | --- | --- | --- | --- | --- | --- | --- |
| | Welcome, outline, schedule | Micha | 1-3 | 5 min | | 09:15 | 09:20 |
| | **Part 1 · Slides:** recap, examining history | Ali | 4-8 | 15 min | | 09:20 | 09:35 |
| 1 | **Part 1 · Exercise:** examining history 💻 | | 9 | 20 min | 20-25 min (+10-15) | 09:35 | 09:55 |
| | **Part 1 · Slides:** submodules | Ali | 10-13 | 10 min | | 09:55 | 10:05 |
| 2 | **Part 1 · Exercise:** submodules 💻 | | 14 | 15 min | 15-18 min (+5-7) | 10:05 | 10:20 |
| | **Part 1 · Slides:** ignoring files | Ali | 15-17 | 5 min | | 10:20 | 10:25 |
| 3 | **Part 1 · Exercise:** ignoring files 💻 | | 18 | 15 min | 10-15 min | 10:25 | 10:40 |
| | Coffee break | all | 19 | 20 min | | 10:40 | 11:00 |
| | **Part 1 · Slides:** cherry-pick, rebase | Mikael | 20-21 | 10 min | | 11:00 | 11:10 |
| 4 | **Part 1 · Exercise:** cherry-pick, rebase 💻 | | 22 | 25 min | 22-26 min (+3-4) | 11:10 | 11:35 |
| | **Part 1 · Slides:** stash, worktree | Mikael | 23-24 | 5 min | | 11:35 | 11:40 |
| 5 | **Part 1 · Exercise:** stash, worktree 💻 | | 25 | 15 min | 12-15 min (+4-6) | 11:40 | 11:55 |
| | **Part 1 · Slides:** hooks | Mikael | 26-27 | 5 min | | 11:55 | 12:00 |
| 6 | **Part 1 · Exercise:** hooks 💻 | | 28 | 15 min | 15-20 min | 12:00 | 12:15 |
| | **Part 1 · Slides:** large files (`git lfs`) | Mikael | 29-30 | 5 min | | 12:15 | 12:20 |
| 7 | **Part 1 · Exercise:** `git lfs` 💻 | | 31 | 10 min | 10-15 min | 12:20 | 12:30 |
| | Lunch break | all | 32 | 60 min | | 12:30 | 13:30 |
| | **Part 2 · Slides:** web workflow + live demonstration | Micha | 33-43 | 45 min | | 13:30 | 14:15 |
| 8 | **Part 2 · Exercise:** full web workflow 💻 | | 44 | 40 min | 30-40 min | 14:15 | 14:55 |
| | Wrap-up: tools, references, questions | Micha | 45-48 | 5 min | | 14:55 | 15:00 |

Totals: 115 min of slides and demonstration, 150 min of exercises, 80 min of breaks.

### What changed in 2026

- Restructured from Parts 0-4 plus a bonus section into two parts: the commands first, then the
web workflow.
- `git bisect` dropped, `git lfs` added; rebase promoted from the bonus section into Exercise 4.
- Exercises rewritten as tasks with optional hints and solutions instead of copy-paste command
lists. They therefore take noticeably longer than the previous versions.
- Start moved 15 min earlier, to 09:15 (the 15:00 end time stays fixed), and the welcome trimmed
from 10 to 5 min, to create room for the longer exercises.
- The budget still falls short of the exercises' own printed estimates, so Exercises 1, 2, 4 and
5 have some tasks marked as **Bonus** (optional, to be skipped when time is short).
- The coffee break sits directly after Exercise 3, matching the slide deck order: the
`.gitignore` slides and Exercise 3 come before the break, cherry-pick, rebase, stash and
worktree after it.

## Previous years

Recorded for the pre-2026 structure (Parts 0-4, 09:00 - 12:30, no lunch break). Kept for
reference only: the parts, the exercise numbering and the exercise format have all changed since,
so these numbers cannot be compared directly with the 2026 table above.

| Description | Presenter | Extent | Time est. | Time needed ('23, '24, '25) | Start | End |
| --- | --- | --- | --- | --- | --- | --- |
| Welcome, outline, schedule | Michael | 3 slides | 5 min | 8 min, 8 min, - | 09:15 | 09:20 |
| Part 1 - Slides: history, submodules | Michael | 9 slides | 20 min | -, -, - | 09:20 | 09:40 |
| Part 1 - Exercises 1-2 | 💻 | | 40 min | 42 min, 42 min, - | 09:40 | 10:20 |
| Part 1 - Slides: ignoring files | Mikael | 3 slides | 10 min | -, -, - | 10:20 | 10:30 |
| Part 1 - Exercise 3 | 💻 | | 20 min | -, -, - | 10:30 | 10:50 |
| Coffee break | all | 1 coffee | 20 min | 23 min, 20 min, - | 10:50 | 11:10 |
| Part 1 - Slides: cherry-pick, rebase, stash, worktree | Mikael | 6 slides | 10 min | -, -, - | 11:10 | 11:20 |
| Part 1 - Exercises 4-5 | 💻 | | 25 min | -, -, - | 11:20 | 11:45 |
| Part 1 - Slides: hooks, git lfs | Alitzel | 6 slides | 10 min | -, -, - | 11:45 | 11:55 |
| Part 1 - Exercises 6-7 | 💻 | | 35 min | 21 min, 21 min, - | 11:55 | 12:30 |
| Lunch break | all | | 60 min | | 12:30 | 13:30 |
| Part 2 - Slides + live demonstration | Michael | 12 slides | 60 min | 8 min, 8 min, - | 13:30 | 14:30 |
| Part 2 - Exercise 8 + wrap-up | 💻 | | 30 min | -, -, - | 14:30 | 15:00 |
| Welcome, Part 0 & 1 | Annika | 10 slides | 10 min | 12 min, 8 min, 8 min | 09:00 | 09:10 |
| Part 1 - Exercises 1-2 | 💻 | | 40 min | 34 min, 42 min, 42 min | 09:10 | 09:50 |
| Part 2 - Slides + demo | Mikael | 8 slides | 30 min | 20 min, 31 min, 30 min | 09:50 | 10:20 |
| Part 2 - Exercises 3-5 | 💻 | | 40 min | 34 min, 29 min, 40 min | 10:20 | 11:00 |
| Coffee break | all | 1 coffee | 20 min | 17 min, 23 min, 20 min | 11:00 | 11:20 |
| Part 2 - Slides (cont.) | Mikael | 4 slides | 10 min | 4 min, 6 min, 13 min | 11:20 | 11:30 |
| Part 2 - Exercises 6-7 | 💻 | | 20 min | 29 min, 21 min, 21 min | 11:30 | 11:50 |
| Part 3 - Slides | Mikael | 6 slides | 10 min | 4 min, 8 min, 8 min | 11:50 | 12:00 |
| Part 3 - Exercise 8 | 💻 | | 20 min | 21 min, 16 min, 17 min | 12:00 | 12:20 |
| Part 4 - Slides | Annika | 3 slides | 10 min | 17 min, 18 min, 3 min | 12:20 | 12:30 |

## Notes for the next run

Expand Down
Loading