Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve file creation explanation #1027

Closed
novica opened this issue Oct 22, 2024 · 3 comments · Fixed by #1031
Closed

Improve file creation explanation #1027

novica opened this issue Oct 22, 2024 · 3 comments · Fixed by #1031

Comments

@novica
Copy link
Contributor

novica commented Oct 22, 2024

How could the content be improved?

In https://swcarpentry.github.io/git-novice/instructor/04-changes.html the text goes as follows:

Let’s create a file called guacamole.md that contains the basic structure to have a recipe.

Then it says:

But remember, the bash command to create or edit a new file 

Then it justi gives the command

$ nano guacamole.md

None of this makes clear the actually running the above creates a file as the introductory sentence states. In fact, it does not. It merely opens the nano buffer. The file will be created upon saving.

I think this needs to be reworded. Maybe the file can be created using touch. That would be one of the usual ways to create an empty file in bash. If not, then explain that the file is not there until saved.

The lesson goes on to run ls but running ls before saving will not show a file, and there is nothing in the text about saving.

Which part of the content does your suggestion apply to?

https://swcarpentry.github.io/git-novice/instructor/04-changes.html

@martinosorb
Copy link
Contributor

The prerequisites to this lesson state "In this lesson we use Git from the Unix Shell. Some previous experience with the shell is expected, but isn’t mandatory." My understanding of this is that it should mean it's the reader's responsibility to understand how nano works, as this is outside of the scope of this lesson. Also, it's hard to exit nano without saving, as it will ask first. So I'm guessing this won't be a problem in practice.

@novica
Copy link
Contributor Author

novica commented Oct 23, 2024

I agree that if you have some knowledge of Shell this is not an issue. But I feel that this is not correct:

But remember, the bash command to create or edit a new file will depend on the editor you choose (it might not be nano).

The bash command for creating files is touch.

So maybe:

But remember, the steps to create create or edit a new file will depend on the editor you choose (it might not be nano).

Also, to:

Let’s first verify that the file was properly created by running the list command (ls):

I would add:

Save the file and exit your editor. Next, let’s verify that the file was properly created by running the list command (ls):

@martinosorb
Copy link
Contributor

Great, I would agree with these changes. Are you willing to submit a PR on this too?

github-actions bot pushed a commit that referenced this issue Oct 28, 2024
Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request #1031 from novica/issue-1027

fix: resolves #1027
github-actions bot pushed a commit that referenced this issue Oct 28, 2024
Auto-generated via `{sandpaper}`
Source  : 6e8d8fc
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2024-10-28 19:23:05 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request #1031 from novica/issue-1027

fix: resolves #1027
github-actions bot pushed a commit that referenced this issue Oct 29, 2024
Auto-generated via `{sandpaper}`
Source  : 6e8d8fc
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2024-10-28 19:23:05 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request #1031 from novica/issue-1027

fix: resolves #1027
github-actions bot pushed a commit to ukceh-rse/git-novice that referenced this issue Nov 1, 2024
Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request swcarpentry#1031 from novica/issue-1027

fix: resolves swcarpentry#1027
github-actions bot pushed a commit to ukceh-rse/git-novice that referenced this issue Nov 1, 2024
Auto-generated via `{sandpaper}`
Source  : 9fdc0f5
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2024-11-01 09:47:13 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request swcarpentry#1031 from novica/issue-1027

fix: resolves swcarpentry#1027
github-actions bot pushed a commit to ukceh-rse/git-novice that referenced this issue Nov 5, 2024
Auto-generated via `{sandpaper}`
Source  : 9fdc0f5
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2024-11-01 09:47:13 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 186c10e
Branch  : main
Author  : Martino Sorbaro <martinosorb@users.noreply.github.com>
Time    : 2024-10-28 19:22:23 +0000
Message : Merge pull request swcarpentry#1031 from novica/issue-1027

fix: resolves swcarpentry#1027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants