aboutsummaryrefslogtreecommitdiff
path: root/presentation/presentation.md
blob: cd80eef2745a3c762ae07da20507b9a89f41da72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
---
title: Git Gud
author: Federico Igne · OxRAM
theme: solarized
css: custom.css
---

# What is Git?

:::::: {.columns}

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

![XKCD 1597: Git (CC BY-NC 2.5)][git]

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

- a version control system.

- keeps track of code snapshots in time.

- decentralised and content agnostic.

:::
::::::

## What is Git?

![Originally created by Linus Torvalds][torvalds]

## Installing

- **Linux:** `<packman> install git`

- **MacOS:** install "Xcode Command Line Tools" 🤔

- **Windows** (most likely 64-bit):

  [https://git-scm.com/download/win](https://git-scm.com/download/win)
  

## An overview

![][overview]

# Initialise a repository

!["G2 Mobilizon" by David Revoy (CC-BY)][clone]

## Initialise a repository

- `git init`

- `git clone <url>`

# Inspect a repository

!["F5 CHATONS" by David Revoy (CC-BY)][inspect]

## Inspect a repository

- `git status`

- `git log` and variations

- `git show <commit>`

# Prepare for a new commit

!["B1 Framadate" by David Revoy (CC-BY)][prepare]

## Prepare for a new commit

- `git add <path>`

- `git restore <path>`

# Commit changes

!["D3 Support" by David Revoy (CC-BY)][commit]

## Commit changes

- `git commit`

# Branch out

!["D4 Alternative a Framasoft" by David Revoy (CC-BY)][branch]

## Branch out

- `git branch`

- `git branch <name>`

- `git checkout <target>`

- `git checkout -b <name> <target>`

- `git merge`

# Collaborate with others

!["C4 Framalang" by David Revoy (CC-BY)][collaborating]

## Collaborate with others

- `git remote`

- `git pull <remote> <branch>`

- `git push <remote> <branch>`

# Final remarks

:::::: {.columns}

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

![XKCD 1296: Git Commit (CC BY-NC 2.5)][git-commit]

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

- "fear of committing"

- breaking things

- [graphical interfaces]

:::
::::::

# Where to go from here?

- [Official documentation]

- man pages (`man git <command>`)

- [GitHub resources]

- [Cheatsheet] (PDF)

- [Oh my Git!?] game

# Questions?

!["Erreur 404 illustration" by David Revoy (CC-BY)][questions]


<!-- References -->

[git]: imgs/xkcd_git.png { width=60% }
[git-commit]: imgs/xkcd_git_commit.png { width=100% }
[torvalds]: imgs/torvalds.jpg { width=50% }
[clone]: imgs/clone.jpg { width=50% }
[overview]: imgs/overview.png { width=70% }
[inspect]: imgs/inspect.jpg { width=50% }
[prepare]: imgs/prepare.jpg { width=50% }
[commit]: imgs/commit.jpg { width=50% }
[branch]: imgs/branch.jpg { width=50% }
[questions]: imgs/questions.jpg { width=50% }
[collaborating]: imgs/collaborating.jpg { width=50% }
[graphical interfaces]: https://git-scm.com/downloads/guis
[Official documentation]: https://git-scm.com/doc
[GitHub resources]: https://docs.github.com/en
[Cheatsheet]: https://education.github.com/git-cheat-sheet-education.pdf
[Oh my Git!?]: https://ohmygit.org/

<!--

Using

- Pandoc 2.13
- Reveal.js 4.2.0

Compiled with

    pandoc -t revealjs --slide-level=2 -s presentation.md -o presentation.html

or for a standalone presentation

    pandoc -s -S -t revealjs --slide-level=2 -s presentation.md -o presentation.html

-->