Skip to content

Commit 1825796

Browse files
committed
Update Git slides and exercise for WT26/27
1 parent 9fd9871 commit 1825796

4 files changed

Lines changed: 34 additions & 13 deletions

File tree

‎01_version_control/git_exercise.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@ Deadline: **Wednesday, October 28, 2026, 9:00**
99
- Add a branch protection rule for the `main` branch of the repository:
1010
- Require a pull request before merging
1111
- Require linear history
12-
- Finally, everybody forks the repository into their own namespace.
12+
- Finally, both of you should fork the repository into your own namespace.
1313

1414
## Idea of the Exercise
1515

1616
- There are three separate exercises. Each one consists of an individual Python file `exerciseX.py`. The exercises build upon each other, work from one to three. Each exercise is described in the comments at the top of the respective Python file.
1717
- Each exercise has two tasks: A and B. Distribute the two tasks and **work on them in parallel**.
1818
- For each task, create a new branch with an appropriate name (e.g., `ex-1-task-A`) and use appropriate commit messages (not `Solve task A`, but `Fix missing copy in Vector construction` or similar).
19-
- When ready, push the new branch via `git push -u <remote> <branchname>` to your own remote and open a pull request to the `main` branch upstream (i.e. use the feature branch workflow, but with feature branches on forks).
20-
- Assign your partner as reviewer. Review, fix problems, and eventually merge. For the best learning experience, use a different order of steps in every exercise.
19+
- When ready, push the new branch via `git push -u <remote> <branchname>` to your own remote and open a pull request to the `main` branch upstream (i.e., use the feature branch workflow, but with feature branches on forks).
20+
- Assign your partner as reviewer. Review, fix any problems, and eventually merge. For the best learning experience, use a different order of steps in every exercise.
2121
- **Goal of the exercises**: Create a linear history with readable commit messages.
2222

2323
## Pytest and Python
2424

2525
- In each task, you typically need to make one of already existing tests pass. We use `pytest` here (you will learn more about `pytest` after Christmas):
26-
- Install from [PyPI](https://pypi.org/project/pytest/): `pip install --user pytest`.
26+
- Make a Python virtual environment: `python -m venv venv` and activate it: `source venv/bin/activate`.
27+
- Install `pytest` from [PyPI](https://pypi.org/project/pytest/): `pip install pytest`.
2728
- Run all tests of a file with `python3 -m pytest exerciseX.py`.
28-
- Run a specific test with `python3 -m pytest exerciseX.py -k TESTNAME`.
29-
- Ask if you are stuck with Python issues (quick search on Google often helps as well). This exercise is about Git, not Python.
29+
- Run a specific test with `python3 -m pytest exerciseX.py -k TESTNAME` (e.g., `-k test_vector_index_access`).
30+
- Ask if you are stuck with Python issues! This exercise is about Git, not Python.
3031

3132
## Submission
3233

‎01_version_control/merge_rebase_slides.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ slideOptions:
100100
```
101101
102102
- A merge takes all commits from `feature` to `main`.
103-
- Sorted by timestamp
104103
- Graph view: `git log --graph`
105104
106105
---
@@ -153,7 +152,8 @@ We use here:
153152
- Create a merge commit
154153
- Squash and merge
155154
- Rebase and merge
156-
- Look at a PR together, e.g. [PR 2346 from preCICE](https://github.com/precice/precice/pull/2346) (will be closed eventually)
155+
156+
<!-- - Look at a PR together, e.g. [PR 2346 from preCICE](https://github.com/precice/precice/pull/2346) (will be closed eventually) -->
157157
158158
> What do the options do?
159159

‎01_version_control/standards_slides.md‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ slideOptions:
4646

4747
---
4848

49-
## Special Files
49+
## Special Files (1)
5050

5151
Certain files lead to special formatting (normally directly at root of repo):
5252

@@ -55,18 +55,37 @@ Certain files lead to special formatting (normally directly at root of repo):
5555
- ... gets rendered on landing page (and in every folder).
5656
- `LICENSE`
5757
- ... contains software license.
58-
- ... gets rendered on right sidebar, when clicking on license, and on repo preview.
58+
- ... gets rendered on the sidebar and on repo preview.
59+
60+
---
61+
62+
## Special Files (2)
63+
5964
- `CONTRIBUTING.md`
6065
- ... contains guidelines for contributing.
6166
- First-time contributors see banner.
6267
- `CODE_OF_CONDUCT.md`
6368
- ... contains code of conduct.
64-
- ... gets rendered on right sidebar.
69+
- ... gets rendered on the sidebar.
70+
71+
---
72+
73+
## Special Files (3)
74+
75+
- `CITATION.cff`
76+
- ... contains preferred citation details.
77+
- ... gets rendered on the sidebar.
78+
- ... export to BibTeX.
79+
- `AGENTS.md`
80+
- ... contains context and instructions for GenAI.
81+
- ... more and more coding agents read it.
82+
6583

6684
---
6785

6886
## Issues and PRs
6987

70-
- Templates for description in `.github` folder
88+
- Templates for description are placed in the `.github` folder.
7189
- `closes #34` (or several other keywords: `fixes`, `resolves`) in commit message or PR description will close issue 34 when merged.
72-
- `help wanted` label gets rendered on repo preview (e.g. *"3 issues need help"*).
90+
- `co-authored-by: name <email>` will attach multiple authors.
91+
- `help wanted` issue label gets rendered on repository preview<br/> (e.g. *"3 issues need help"*).

‎01_version_control/workflow_slides.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ slideOptions:
108108
- Easier to review
109109
- Faster to merge --> fewer conflicts
110110
- Easier to squash
111+
- Since 2026, GitHub also allows [stacked PRs](https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests)
111112

112113
---
113114

0 commit comments

Comments
 (0)