Skip to content

Commit d63ca25

Browse files
committed
markdown source builds
Auto-generated via `{sandpaper}` Source : 90dd430 Branch : main Author : erinmgraham <erin.graham@jcu.edu.au> Time : 2025-12-08 22:55:32 +0000 Message : Merge pull request swcarpentry#1102 from anoukvlug/text_edit Update 06-ignore.md (minor edit)
1 parent 405b68f commit d63ca25

9 files changed

Lines changed: 63 additions & 38 deletions

01-basics.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ A version control system is a tool that keeps track of these changes for us,
5757
effectively creating different versions of our files. It allows us to decide
5858
which changes will be made to the next version (each record of these changes is
5959
called a [commit](../learners/reference.md#commit)), and keeps useful metadata
60-
about them. The complete history of commits for a particular project and their
61-
metadata make up a [repository](../learners/reference.md#repository).
60+
about them, such as who made the change. The complete history of commits for a
61+
particular project and their metadata make up a [repository](../learners/reference.md#repository).
6262
Repositories can be kept in sync across different computers, facilitating
6363
collaboration among different people.
6464

@@ -76,6 +76,14 @@ are *distributed*, meaning that they do not need a centralized server to host th
7676
These modern systems also include powerful merging tools that make it possible for multiple authors to work on
7777
the same files concurrently.
7878

79+
Git was created by Linus Torvalds in 2005
80+
as an alternative to BitKeeper, one of the first distributed version control
81+
systems, to track changes in the Linux kernel.
82+
Torvalds provided several explanations of the name, of varying degrees of
83+
politeness, which are enumerated in the
84+
[project's README](https://github.com/git/git/blob/master/README.md?plain=1#L55),
85+
including "Global Information Tacker" for when "you're in a good mood".
86+
7987
For those interested, The Carpentries has a [Version Control with Mercurial](https://swcarpentry.github.io/hg-novice/) lesson (2013-2018), which provides additional context and historical perspective.
8088
::::::::::::::::::::::::::::::::::::::::::::::::::
8189

04-changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ links and other things that might go into a web page.
6868
| ``` | <p></p> |
6969
| 1. Use numbers | 1. Use numbers |
7070
| 1. to create | 2. to create |
71-
| 1. bullet lists. | 3. numbered lists. |
71+
| 1. numbered lists. | 3. numbered lists. |
7272
| ``` | |
7373
+---------------------------------------+------------------------------------------------+
7474
+---------------------------------------+------------------------------------------------+

06-ignore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Use -f if you really want to add them.
130130

131131
If we really want to override our ignore settings,
132132
we can use `git add -f` to force Git to add something. For example,
133-
`git add -f a.csv`.
133+
`git add -f a.png`.
134134
We can also always see the status of ignored files if we want:
135135

136136
```bash

07-github.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,36 @@ ls: cannot access '/c/Users/Alfredo/.ssh': No such file or directory
168168
If SSH has been set up on the computer you're using, the public and private key pairs will be listed. The file names are either `id_ed25519`/`id_ed25519.pub` or `id_rsa`/`id_rsa.pub` depending on how the key pairs were set up.
169169
Since they don't exist on Alfredo's computer, he uses this command to create them.
170170

171+
::::::::::::::::::::::::::::::::::::::::: spoiler
172+
173+
## Resolving SSH Key Conflicts: Custom Names and Paths
174+
175+
If you need to create an SSH key pair with a custom name or store it in a non-default location (e.g., because a default-named key like id_ed25519 already exists), Git may not automatically use it when pushing or pulling from GitHub.
176+
177+
One solution is to add a GitHub entry to your SSH config.
178+
179+
Open or create the SSH config file:
180+
181+
```bash
182+
183+
$ nano ~/.ssh/config
184+
```
185+
186+
Add an entry for GitHub, replacing the path with your key’s actual name and location:
187+
188+
```
189+
Host github.com
190+
HostName github.com
191+
User git
192+
IdentityFile ~/<full_path_to_SSH_key_file>/<key_name>
193+
IdentitiesOnly yes
194+
```
195+
196+
Save and exit. Now Git will use the correct key when pushing to GitHub.
197+
198+
::::::::::::::::::::::::::::::::::::::::::::::::::
199+
200+
171201
### 3\.1 Create an SSH key pair
172202

173203
To create an SSH key pair Alfredo uses this command, where the `-t` option specifies which type of algorithm to use and `-C` attaches a comment to the key (here, Alfredo's email):

10-open.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ approach for your current project and explain why.
139139

140140
### Useful Resource
141141
Confused by the sheer number of different repositories you could choose for your data?
142-
This [repository selection flowchart](https://zenodo.org/records/11105430) aims to "guide users through a series of considerations for slecting the right repository for sharing data."
142+
This [repository selection flowchart](https://zenodo.org/records/11105430) aims to "guide users through a series of considerations for selecting the right repository for sharing data."
143143

144144
:::::::::::::::
145145

14-supplemental-rstudio.md

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -133,46 +133,33 @@ would tell us:
133133

134134
![](fig/RStudio_screenshot_viewhistory.png){alt='RStudio screenshot showing the "Review Changes" dialog after pressing the "History" button. The top panel lists the commits in the repository, similar to git log. The bottom panel shows the changes included in the commit that has been selected in the top panel.'}
135135

136-
RStudio creates a number of files that it uses to keep track of a project. We
137-
often don't want to track these, in which case we add them to our `.gitignore`
138-
file:
136+
Now that you've confirmed your commit history locally using the Git pane in RStudio, you can head over to GitHub to see the same history reflected in your repository online.
139137

140-
![](fig/RStudio_screenshot_gitignore.png){alt='RStudio screenshot showing .gitignore open in the editor pane with the files .Rproj.user, .Rhistory, .RData, and \*.Rproj added to the end'}
141-
142-
::::::::::::::::::::::::::::::::::::::::: callout
143-
144-
## Tip: versioning disposable output
145-
146-
Generally you do not want to version control disposable output (or read-only
147-
data). You should modify the `.gitignore` file to tell Git to ignore these
148-
files and directories.
138+
To view it, go to your repository page and click on the "Commits" link near the top.
149139

140+
![](fig/github_screenshot_find_commit_history_edited.png){alt='GitHub screenshot showing where to find the commit history button.'}
150141

151-
::::::::::::::::::::::::::::::::::::::::::::::::::
152-
153-
::::::::::::::::::::::::::::::::::::::: challenge
142+
This will open a list of all commits, showing who made each change and when.
154143

155-
## Challenge
144+
![](fig/github_screenshot_history_edited.png){alt='GitHub screenshot showing commit history.'}
156145

157-
1. Create a new directory within your project called `graphs`.
158-
2. Modify the `.gitignore` so that the `graphs` directory is not version controlled.
146+
After seeing how your commit history appears on GitHub, you can be confident that your changes have been successfully pushed and recorded.
159147

160-
::::::::::::::: solution
148+
Next, let’s take a look at how RStudio quietly helps manage your repository by automatically updating the `.gitignore` file.
161149

162-
## Solution to Challenge
150+
When you create a *New Project* in RStudio, it generates an *.Rproj file and a hidden folder called `.Rproj.user`. These are used to store project-specific settings and user preferences.
163151

164-
This can be done in Rstudio:
152+
RStudio recognizes that these files typically shouldn’t be tracked in version control, so it automatically adds `.Rproj.user` to your existing `.gitignore` file.
165153

166-
```r
167-
dir.create("./graphs")
168-
```
154+
Notice that the `.gitignore` file was modified and appears as a changed file in the Git tab on the right-hand side panel.
169155

170-
Then open up the `.gitignore` file from the right-hand panel of Rstudio and add
171-
`graphs/` to the list of files to ignore.
156+
![](fig/RStudio_screenshot_gitignore.png){alt='RStudio screenshot showing .gitignore open in the editor pane with the .Rproj.user folder added to the end.'}
172157

158+
::::::::::::::::::::::::::::::::::::::: challenge
173159

160+
## Push the .gitignore changes to GitHub
174161

175-
:::::::::::::::::::::::::
162+
Consider adding other files to be ignored, such as recipes.Rproj, .Rhistory and .RData, and complete the process for saving RStudio's `.gitignore` file changes to your remote repository.
176163

177164
::::::::::::::::::::::::::::::::::::::::::::::::::
178165

107 KB
Loading
137 KB
Loading

md5sum.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
"LICENSE.md" "ea0c0c96819430451d30c4cb669e0c64" "site/built/LICENSE.md" "2025-05-27"
44
"config.yaml" "69e678021a92f74f922e53d180d05f47" "site/built/config.yaml" "2025-05-27"
55
"index.md" "a37c98b62b9cd48ff67c51cea5240a1f" "site/built/index.md" "2025-05-27"
6-
"episodes/01-basics.md" "d305d8155247ab90d4ad43c4311868d6" "site/built/01-basics.md" "2025-05-27"
6+
"episodes/01-basics.md" "ae7fd7e74b037050fd4e0ce7fc950551" "site/built/01-basics.md" "2025-12-11"
77
"episodes/02-setup.md" "169455416b0e7425b6e3e4a956104471" "site/built/02-setup.md" "2025-05-27"
88
"episodes/03-create.md" "c1198fc3106059d83fd8078d57fbbfef" "site/built/03-create.md" "2025-05-27"
9-
"episodes/04-changes.md" "10b891940dec94a412a779a1d749a66b" "site/built/04-changes.md" "2025-05-27"
9+
"episodes/04-changes.md" "93a58793b2e796ce0c4dcfd5ab4a9690" "site/built/04-changes.md" "2025-12-11"
1010
"episodes/05-history.md" "1db0ac027bd51d7d67562d71a60116c8" "site/built/05-history.md" "2025-05-27"
11-
"episodes/06-ignore.md" "ff0a74d69b9f3bf60795226eb0e6a6bd" "site/built/06-ignore.md" "2025-05-27"
12-
"episodes/07-github.md" "8f7083251bc0e76a78afcc582f5cc03f" "site/built/07-github.md" "2025-05-27"
11+
"episodes/06-ignore.md" "6eceffedf94c557d57c9a774dcc0780b" "site/built/06-ignore.md" "2025-12-11"
12+
"episodes/07-github.md" "3fb726f8778cafc2fac05e977c488482" "site/built/07-github.md" "2025-12-11"
1313
"episodes/08-collab.md" "26c15a5971a7caef2daf17c84e72d3c9" "site/built/08-collab.md" "2025-05-27"
1414
"episodes/09-conflict.md" "f50920c3da4791a58f81f7fc330a03b0" "site/built/09-conflict.md" "2025-05-27"
15-
"episodes/10-open.md" "9701759e294a60cd809f51991e41a462" "site/built/10-open.md" "2025-05-27"
15+
"episodes/10-open.md" "a2e760a72717318ed5afe9795a62ccc6" "site/built/10-open.md" "2025-12-11"
1616
"episodes/11-licensing.md" "9d330aa85b9165c29cbc4916d2a0c26a" "site/built/11-licensing.md" "2025-05-27"
1717
"episodes/12-citation.md" "7884b833e1ab2d571a750499177e8d60" "site/built/12-citation.md" "2025-05-27"
1818
"episodes/13-hosting.md" "c390f6e5ab0017576241ff881a26604c" "site/built/13-hosting.md" "2025-05-27"
19-
"episodes/14-supplemental-rstudio.md" "fb775c44625313a1b5adc7b012b3766e" "site/built/14-supplemental-rstudio.md" "2025-05-27"
19+
"episodes/14-supplemental-rstudio.md" "2a37ee16c2287d1bb61c26eb987c1fbd" "site/built/14-supplemental-rstudio.md" "2025-12-11"
2020
"instructors/instructor-notes.md" "688d07f9e69038f83982baab441c82dd" "site/built/instructor-notes.md" "2025-05-27"
2121
"learners/discuss.md" "bd705f10fa71c050333662cb12494f34" "site/built/discuss.md" "2025-05-27"
2222
"learners/reference.md" "d976a57639fa49361d9c8431850cde6a" "site/built/reference.md" "2025-05-27"

0 commit comments

Comments
 (0)