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
5 changes: 4 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ website:
logo-alt: "Logo, with a cartoon blue cloud with electronic circuits"
sidebar:
contents:
- href: https://github.com/ARCTraining/git
text: Visit the GitHub repository
- section: Day 1
contents:
- href: version_control/01_intro.qmd
Expand All @@ -26,7 +28,8 @@ website:
contents:
- href: version_control/05_undo_changes.qmd
- href: version_control/05_homework.qmd
- href: version_control/collaboration.qmd
- href: version_control/06_collaboration.qmd
- href: version_control/06_practical.qmd

format:
html:
Expand Down
Binary file added assets/collab1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/collab2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions version_control/06_collaboration.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "6. Collaboration"
subtitle: "How do we work together with others on projects?"
format:
html:
respect-user-color-scheme: true
theme:
light: [cosmo, ../theme.scss, styles.scss]
dark: [cosmo, ../theme-dark.scss, styles.scss]
css: ../styles.css
toc: true
---

Let's learn about some git features that can help with collaboration!

:::{.callout-tip}
## Reveal.js Presentation Controls

The presentation linked below uses Reveal.js to build a HTML presentation. You can use the following keyboard shortcuts:

- **Navigate slides**: Use arrow keys (←/→) or space bar to advance
- **Overview mode**: Press `O` to see all slides at once
- **Speaker notes**: Press `S` to open speaker view
- **Help menu**: Press `?` to see all keyboard shortcuts
- **Fullscreen**: Press `F` to toggle fullscreen mode
- **Zoom**: Press `Alt` + click to zoom in on slide content
- **Print/PDF**: Add `?print-pdf` to the URL for print-friendly version

:::

[Open introduction presentation ↗](06_presentation.qmd){.btn .btn-outline-primary .btn role="button" data-toggle="tooltip" title="Open presentation in a new tab" target="_blank"}
32 changes: 32 additions & 0 deletions version_control/06_practical.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "6.1 Practical"
subtitle: "Forking repositories and collaborating"

---

In this practical, we're going to *fork* and collaborate on a repository together!

1. Fork this [repository](https://github.com/ARCTraining/git-oct-2025), accept the defaults.
2. You'll see a spooky halloween story in the README.md file (copied below).
- Let's start contributing to the story!
- Make changes in your fork and contribute back to the main.



## 🎃 The Haunted Lab Mad Libs 🧪

**Fill in the blanks and discover what happens when science meets the supernatural!**

It was a **[adjective]** October night when Dr. **[last name]** was working late in their **[adjective]** laboratory. They had been studying **[plural noun]** for **[number]** months, hoping to make a **[adjective]** breakthrough.

As they **[past tense verb]** through their research notes, something **[adjective]** caught their eye. A petri dish containing **[gross substance]** was **[verb ending in -ing]** three feet above the lab bench!

"This is **[exclamation]**!" they whispered, adjusting their **[plural noun]** nervously. The dish began to **[verb]** in a **[adjective]** pattern, glowing with a **[color]** light.

Suddenly, a **[adjective]** voice echoed through the lab: "Your research on **[scientific term]** has awakened us! We are the spirits of **[number]** researchers who died from **[silly cause of death]**!"

Dr. **[same last name]** grabbed their **[lab equipment]** and **[past tense verb]** toward the exit, but the ghostly petri dish **[past tense verb]** them, leaving behind only the smell of **[weird smell]** and a mysterious **[color]** residue.

*The next morning, their lab mates found only a **[adjective]** note that read: "Gone to study **[spooky subject]** with the ghost researchers. Back by **[day of week]**... maybe."*

**🧬 Happy Halloween from the haunted lab! 👻**
93 changes: 93 additions & 0 deletions version_control/06_presentation.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Collaboration"
subtitle: "Tools that can help with collaborating on git repositories"
# bibliography: ../assets/refs.bib
format:
revealjs:
theme: styles.scss
footer: "[SWD2: Intro to version control with git and GitHub](../index.qmd) | [Advanced Research Computing, Uni of Leeds](https://arc.leeds.ac.uk/) | [Ask us for help](https://it.leeds.ac.uk/it?id=sc_cat_item&sys_id=7587b2530f675f00a82247ece1050eda)"
---

## There are many ways to collaborate

![Everyone can use one repository, added as collaborators](../assets/collab1.png)

## There are many ways to collaborate

:::: {.columns}

::: {.column width="60%"}

![Everyone can use one repository, added as collaborators](../assets/collab1.png)

:::

::: {.column width="40%"}

- You need to trust everyone!
- Important to use branches
- Good for small teams

:::

::::

## There are many ways to collaborate

![People can fork or copy the repository](../assets/collab2.png)

## There are many ways to collaborate

:::: {.columns}

::: {.column width="50%"}

![People can fork or copy the repository](../assets/collab2.png)

:::

::: {.column width="50%"}

- Can let anyone fork the repository and make changes
- They have to make a "pull request" so you can review their changes
- Easier for bigger projects
- This is what we will be trying out today!

:::

::::

## Useful git tools: `.gitignore`

- Something that is particularly useful when working on a group project is the git ignore file

:::: {.columns}

::: {.column width="50%"}

- A file called `.gitignore` in the top/parent directory of your git repository
- Plain text file with a list of files that should not be tracked with git

:::

::: {.column width="50%"}

```text

scratch_notes.md
__pycache__/
.ipynb_checkpoints
_build/
*.egg

```

*We can chat about Jupyter notebooks and their issues with git at the end of the course during the Q&A if you like.*

:::

::::

## Collaboration

Let's jump straight in to it!
14 changes: 0 additions & 14 deletions version_control/collaboration.qmd

This file was deleted.