---
title: "Basic Git workflow"
subtitle: "Session 04"
date: 2024-11-08T10:15
metadata-files:
  - _sessions.yml
about:
  id: hero-heading
  template: solana
  image-width: 0em
  links:
    - icon: display
      text: Slides
      href: https://lennartwittkuhn.com/version-control-course-uhh-eur-ws24/sessions/slides_session04.html
      aria-label: display
    - icon: book
      text: "Chapter: First steps with Git"
      href: https://lennartwittkuhn.com/version-control-book/chapters/first-steps-git.html
      aria-label: book
    - icon: book
      text: "Chapter: Git Essentials"
      href: https://lennartwittkuhn.com/version-control-book/chapters/git-essentials.html
      aria-label: book
    - icon: input-cursor-text
      text: Quiz
      href: https://version-control-basics.formr.org/
      aria-label: input-cursor-text
chapter: |
  ["First steps with Git"](https://lennartwittkuhn.com/version-control-book/chapters/first-steps-git.html) and ["Git Essentials"](https://lennartwittkuhn.com/version-control-book/chapters/git-essentials.html)
quiz-url: https://version-control-basics.formr.org/
---

::: {#hero-heading}
:::

## This session

{{< include tasks-template.qmd >}}

## Learning objectives

### First steps with Git

{{< include ../objectives/_objectives-firststeps.qmd >}}

### Git Essentials

{{< include ../objectives/_objectives-essentials.qmd >}}

## `{{< var course.project >}}` project

{{< include project/project-essentials.qmd >}}

## Exercises

{{< include ../exercises/_exercises-first-steps-git.qmd >}}

### Amend a commit

{{< include ../exercises/_exercises-essentials-amend.qmd >}}

### Create a `.gitignore` file

{{< include ../exercises/_exercises-essentials-gitignore.qmd >}}

## Slides

```{=html}
<iframe width="100%" height=500 src="slides_session04.html"></iframe>
```

{{< include _print-to-pdf.qmd >}}

## Cheatsheet

### First steps with Git

```{r}
#| eval: true
#| echo: false
#| message: false
#| warning: false
knitr::kable(table_cheatsheet(name = "basic"), format = "markdown", row.names = FALSE)
```

### Git Essentials

```{r}
#| eval: true
#| echo: false
#| message: false
#| warning: false
knitr::kable(table_cheatsheet(name = "essentials"), format = "markdown", row.names = FALSE)
```
