Skip to content

Commit ae2d824

Browse files
committed
feat(version): add mcq (#145)
1 parent de36ab5 commit ae2d824

1 file changed

Lines changed: 82 additions & 5 deletions

File tree

pages/guide/setup/version.qmd

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,90 @@ It will ask for a name and contact email. You can typically then select that the
619619

620620
## Test yourself
621621

622-
If you haven't already, **have a go at setting up a GitHub repository** to use when working through this book.
622+
<div class="h3-tight"></div>
623+
624+
### Quiz
625+
626+
```{r}
627+
#| echo: false
628+
library(webexercises) # nolint: library_call_linter
629+
```
630+
631+
:::{.callout-note}
632+
633+
## What does cloning a repository from GitHub allow you to do?
634+
635+
```{r}
636+
#| output: asis
637+
#| echo: false
638+
cat(longmcq(c(
639+
"View the repository in your browser, but not edit any files locally.",
640+
"Copy the repository to a new GitHub account without keeping any history.",
641+
answer = paste0(
642+
"Create a local copy of the remote repository on your computer so you can ",
643+
"edit files and sync changes between local and remote."
644+
)
645+
)))
646+
```
647+
648+
:::
649+
650+
:::{.callout-note}
651+
652+
## You have edited `README.md` and want those changes included in your next commit. Which command should you run first?
653+
654+
```{r}
655+
#| output: asis
656+
#| echo: false
657+
cat(longmcq(c(
658+
"`git status README.md`",
659+
answer = "`git add README.md`",
660+
"`git clone README.md`"
661+
)))
662+
```
663+
664+
:::
623665

624-
We will provide examples in both Python and R - following along in your own repository helps build understanding and practial skills.
666+
:::{.callout-note}
625667

626-
### Steps to practice
668+
## You are working alone on a project and want to try a risky change without breaking your main code. What is the best Git approach?
669+
670+
```{r}
671+
#| output: asis
672+
#| echo: false
673+
cat(longmcq(c(
674+
"Clone the repository again into a new folder and work only in that copy.",
675+
answer = paste0(
676+
"Create a new branch, make changes there, and merge back ",
677+
"when you're happy."
678+
),
679+
"Edit files directly on the main branch and hope you can undo if needed."
680+
)))
681+
```
682+
683+
:::
684+
685+
:::{.callout-note}
686+
687+
## What is a key advantage of creating a GitHub organisation for a team project?
688+
689+
```{r}
690+
#| output: asis
691+
#| echo: false
692+
cat(longmcq(c(
693+
answer = paste0(
694+
"It provides shared ownership and continuity so multiple people can ",
695+
"manage and access related repositories under one organisational account."
696+
),
697+
"It hides all repositories from collaborators so only you can access them."
698+
)))
699+
```
700+
701+
:::
702+
703+
### Activity
704+
705+
If you haven't already, **have a go at setting up a GitHub repository** to use when working through this book. We will provide examples in both Python and R, and following along in your own repository will help build understanding and practial skills. You should try to:
627706

628707
::: {.python-content}
629708
1. **Create a repository** (e.g. `des-rap-python`) with `README.md`, `.gitignore` and `LICENSE`.
@@ -642,8 +721,6 @@ We will provide examples in both Python and R - following along in your own repo
642721

643722
6. **Delete the branch**.
644723

645-
<br>
646-
647724
::: {.callout-tip}
648725

649726
If you plan to explore both languages, make separate repositories for each, as their project structures and workflows differ.

0 commit comments

Comments
 (0)