Skip to content

Commit

Permalink
docs: add links to Git resources
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Apr 18, 2024
1 parent 83c717c commit a95ddf0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
16 changes: 15 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pak::pak("maelle/saperlipopette")
You'll also need

- a [Git installation](https://happygitwithr.com/install-git), but if you made it here you probably already use Git at least a bit.
- basic Git knowledge, in particular being able to examine the Git history, be it with [git log](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History) or a tool in your IDE.
- [basic Git knowledge](#recommended-resources-about-git), in particular being able to examine the Git history, be it with [git log](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History) or a tool in your IDE.
- a directory where to store the exercises folder. In all examples we use a temporary directory but if you prefer, you could use a dedicated "scratch directory".

## Why this name?
Expand Down Expand Up @@ -90,3 +90,17 @@ parent_path2 <- withr::local_tempdir()
path2 <- exo_one_small_change(parent_path2)
gert::git_log(repo = path2)
```



### Recommended resources about Git

For beginners:

- [Happy Git with R](https://happygitwithr.com/)
- [Learn Git branching](https://learngitbranching.js.org/)

For users less new to Git:

- [Git in Practice by Mike McQuaid](https://masalmon.eu/2023/11/01/reading-notes-git-in-practice/)
- [Pro Git by Scott Chacon](https://masalmon.eu/2024/01/19/pro-git-scott-chacon-reading-notes/)
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ You’ll also need

- a [Git installation](https://happygitwithr.com/install-git), but if
you made it here you probably already use Git at least a bit.
- basic Git knowledge, in particular being able to examine the Git
history, be it with [git
- [basic Git knowledge](#recommended-resources-about-git), in particular
being able to examine the Git history, be it with [git
log](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History)
or a tool in your IDE.
- a directory where to store the exercises folder. In all examples we
Expand All @@ -47,10 +47,10 @@ This is a basic example which shows you how to solve a common problem:
library("saperlipopette")
parent_path <- withr::local_tempdir()
path <- exo_one_small_change(parent_path)
#> ℹ Follow along in /tmp/RtmpqqBEgT/file134996abeef9f/one-small-change!
#> ℹ Follow along in /tmp/RtmpsiMrDj/file3e4f6663be0d/one-small-change!
# what's in path
fs::dir_tree(path)
#> /tmp/RtmpqqBEgT/file134996abeef9f/one-small-change
#> /tmp/RtmpsiMrDj/file3e4f6663be0d/one-small-change
#> ├── R
#> └── bla
# with Git in a command line: git log
Expand Down Expand Up @@ -102,7 +102,7 @@ building documentation.
``` r
parent_path <- withr::local_tempdir()
path <- exo_one_small_change(parent_path)
#> ℹ Follow along in /tmp/RtmpqqBEgT/file134993f2829c5/one-small-change!
#> ℹ Follow along in /tmp/RtmpsiMrDj/file3e4f474cb413/one-small-change!
gert::git_log(repo = path)
#> # A tibble: 2 × 6
#> commit author time files merge message
Expand All @@ -111,11 +111,25 @@ gert::git_log(repo = path)
#> 2 e227ecc55e421f70b6e30602e6a2ee… Jane … 2023-12-15 16:25:00 2 FALSE "First…
parent_path2 <- withr::local_tempdir()
path2 <- exo_one_small_change(parent_path2)
#> ℹ Follow along in /tmp/RtmpqqBEgT/file134997abdb717/one-small-change!
#> ℹ Follow along in /tmp/RtmpsiMrDj/file3e4f65cbaffc/one-small-change!
gert::git_log(repo = path2)
#> # A tibble: 2 × 6
#> commit author time files merge message
#> * <chr> <chr> <dttm> <int> <lgl> <chr>
#> 1 2ff0d31f566e68ae0ee94b6028a3fa… Jane … 2023-12-15 16:25:00 1 FALSE "feat:…
#> 2 e227ecc55e421f70b6e30602e6a2ee… Jane … 2023-12-15 16:25:00 2 FALSE "First…
```

### Recommended resources about Git

For beginners:

- [Happy Git with R](https://happygitwithr.com/)
- [Learn Git branching](https://learngitbranching.js.org/)

For users less new to Git:

- [Git in Practice by Mike
McQuaid](https://masalmon.eu/2023/11/01/reading-notes-git-in-practice/)
- [Pro Git by Scott
Chacon](https://masalmon.eu/2024/01/19/pro-git-scott-chacon-reading-notes/)

0 comments on commit a95ddf0

Please sign in to comment.