Skip to content

Commit fdac382

Browse files
author
davidwilby
committed
remove some images; add github slides
1 parent b561523 commit fdac382

File tree

8 files changed

+126
-10
lines changed

8 files changed

+126
-10
lines changed

assets/images/fisheyes.png

-145 KB
Binary file not shown.

assets/images/git.png

-2.33 KB
Binary file not shown.

assets/images/gitbash.jpg

-28.8 KB
Binary file not shown.

assets/images/github.png

-6.94 KB
Binary file not shown.

assets/images/gitkraken.png

-4.61 KB
Binary file not shown.

assets/images/gitlab.png

-2.23 KB
Binary file not shown.
255 KB
Loading

index.qmd

Lines changed: 126 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
2-
title: "How to suck less at<br>(research)<br>software engineering"
2+
title: "Good practice:<br>How to suck less at<br>(research)<br>software engineering"
33
format:
44
revealjs:
55
theme: custom.scss
66
slide-number: true
77
show-slide-number: speaker
88
chalkboard: true
99
code-line-numbers: false
10+
preview-links: auto
1011
author: "**Dr David Wilby** (he/him)<br>[RSE Team](https://rse.shef.ac.uk/), The University of Sheffield<br>[**rse.shef.ac.uk**](https://rse.shef.ac.uk) | [**davidwilby.dev**](https://davidwilby.dev)"
1112
date: 02/13/2023
1213
date-format: "ddd Do MMMM YYYY"
@@ -76,6 +77,10 @@ Go to [menti.com](https://menti.com) and enter the code **8145 3365**
7677

7778
## Outline
7879

80+
* Why do we need good practice?
81+
* Git
82+
* GitHub
83+
* Testing
7984

8085
##
8186

@@ -202,7 +207,7 @@ The most important concept in git is the `commit` - the name given to a unit of
202207
:::
203208

204209

205-
## Making a commit
210+
## Making a commit {{< fa solid code-commit >}}
206211

207212
```{mermaid}
208213
%%| fig-height: 6
@@ -220,7 +225,7 @@ Git generates a hash string, uniquely identifying each commit.
220225

221226
::: {.callout-note appearance="simple"}
222227

223-
Git uses a "Merkle tree" under the hood. (Don't ask me how it works)
228+
Git uses a "[Merkle tree](https://en.wikipedia.org/wiki/Merkle_tree)" under the hood. (Don't ask me how it works, I have no idea :shrug:)
224229

225230
:::
226231

@@ -244,8 +249,6 @@ But are most often seen as the first 7 characters, as this is easier to read/typ
244249

245250
## Branches {{< fa solid code-branch >}}
246251

247-
<br>
248-
249252
Used to work on new features/changes/additions to the code.
250253

251254
<br>
@@ -262,6 +265,21 @@ gitGraph
262265
commit id:"2420edd"
263266
```
264267

268+
```bash
269+
git branch experiment
270+
git checkout experiment
271+
git commit
272+
git commit
273+
git commit
274+
```
275+
276+
277+
::: {.callout-note appearance="simple"}
278+
279+
**Checkout**: switching to a different branch.
280+
281+
:::
282+
265283

266284
## Merging {{< fa solid code-merge >}}
267285

@@ -286,8 +304,14 @@ gitGraph
286304
commit id:"60489ec"
287305
```
288306

307+
```bash
308+
git checkout main
309+
git merge experiment
310+
git commit
311+
```
312+
289313

290-
## Simple demo
314+
## Demo
291315

292316
<br>
293317

@@ -299,19 +323,66 @@ or
299323

300324
or
301325

326+
327+
{{< qrcode https://onlywei.github.io/explain-git-with-d3 width=350 height=350 >}}
328+
329+
330+
## Repositories (Repos)
331+
302332
<br>
303333

304-
{{< qrcode https://onlywei.github.io/explain-git-with-d3 >}}
334+
::: {.callout-note appearance="simple"}
335+
336+
Once a directory/folder is *initialised* with `git` it becomes a *repository*.
337+
338+
<br>
339+
340+
:::
341+
342+
::: columns
343+
344+
::: {.column width="40%"}
345+
**directory**
346+
```
347+
.
348+
├── src/
349+
├── LICENSE.md
350+
└── README.md
351+
```
352+
:::
353+
354+
::: {.column width="20%"}
355+
356+
`git init`
357+
------->
358+
359+
:::
360+
361+
::: {.column width="40%"}
305362

363+
**repository**
364+
```
365+
.
366+
├── .git/
367+
├── src/
368+
├── LICENSE.md
369+
└── README.md
370+
```
371+
372+
:::
373+
374+
:::
306375

307-
## Where to use Git
376+
377+
## How to interact with Git
308378

309379
<br>
310380

311381
### command line `git` {{< fa brands git-alt >}}
312382
via unix shell (or gitbash/WSL on Windows)
313383

314384
```bash
385+
$ git add README.md
315386
$ git commit -m 'initial commit'
316387
$ git status
317388
```
@@ -351,12 +422,23 @@ $ git status
351422
::: {.column width="60%"}
352423

353424
* [Pro Git Book](http://git-scm.com/book/en/v2)
354-
* [software carpentry lesson](http://swcarpentry.github.io/git-novice/)
425+
* [Software carpentry lesson](http://swcarpentry.github.io/git-novice/)
355426
* *\"oh sh\*\* git\"* - [zine](https://wizardzines.com/zines/oh-shit-git/), or [blog](https://ohshitgit.com/)
356427
* [The Turing Way](https://the-turing-way.netlify.app/reproducible-research/vcs.html)
357428
* [stack overflow](https://stackoverflow.com/) *etc.* - *use carefully* :warning:
358429
* blogs on [dev](https://dev.to/) or [atlassian](https://www.atlassian.com/git/tutorials) *etc.*
359430

431+
::: {.callout-warning appearance="simple"}
432+
433+
**Remember**
434+
435+
Learning Git is a process.
436+
437+
Everyone makes mistakes.
438+
439+
:::
440+
441+
360442
:::
361443

362444
::: {.column width="40%"}
@@ -365,7 +447,41 @@ $ git status
365447

366448
:::
367449

368-
## Git vs GitHub
450+
## Git {{< fa brands git-alt >}} vs GitHub {{< fa brands github >}} or GitLab {{< fa brands gitlab >}}
451+
452+
<br>
453+
454+
**Git**
455+
456+
* Local client for source code management
457+
* Interacting with remote git servers
458+
459+
**GitHub/GitLab**
460+
461+
* Code hosting
462+
* Collaboration
463+
* OSS contribution
464+
* Project management
465+
* Automated workflows/continuous delivery
466+
467+
468+
## Repositories
469+
470+
![](assets/images/talk_repo_screenshot.png)
471+
472+
## Issues
473+
474+
![](assets/images/github_issues_screenshot.png)
475+
476+
## Projects/Kanban Board
477+
478+
![](assets/images/github_projects_screenshot.png)
479+
480+
481+
# Testing
482+
483+
# Environment & Dependency Management
484+
369485

370486
## Great resources
371487

0 commit comments

Comments
 (0)