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

Update 03 create episode #5

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Update 03 create episode #5

wants to merge 11 commits into from

Conversation

dtwwwc1e
Copy link

@dtwwwc1e dtwwwc1e commented Oct 1, 2024

No description provided.

Copy link

github-actions bot commented Oct 1, 2024

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/UCL-ARC/git-novice-vscode/compare/md-outputs..md-outputs-PR-5

The following changes were observed in the rendered markdown documents:

 02-setup.md                                        |  12 +-
 03-create.md                                       | 194 +++++-------
 04-changes.md                                      | 246 ++++++++-------
 05-history.md                                      | 342 +++++++++++++--------
 06-ignore.md                                       | 100 +++---
 07-github.md                                       |  86 +++---
 08-collab.md                                       |  45 +--
 09-conflict.md                                     | 250 +++++++++------
 12-citation.md                                     |  28 +-
 13-hosting.md                                      |   3 +-
 14-supplemental-rstudio.md                         |   8 +-
 discuss.md                                         | 130 ++++----
 fig/03-a-create-directory.JPG (new)                | Bin 0 -> 71715 bytes
 fig/03-a-directory-opened.JPG (new)                | Bin 0 -> 60618 bytes
 fig/03-a-select-directory.JPG (new)                | Bin 0 -> 111009 bytes
 fig/03-b-initialize-repository.JPG (new)           | Bin 0 -> 64534 bytes
 fig/03-b-source-control-menu.JPG (new)             | Bin 0 -> 68883 bytes
 fig/03-b-source-control.JPG (new)                  | Bin 0 -> 44947 bytes
 fig/03-c-directory-empty-view-menu.JPG (new)       | Bin 0 -> 40717 bytes
 fig/03-c-directory-show-hidden-items.JPG (new)     | Bin 0 -> 41558 bytes
 fig/03-d-main.JPG (new)                            | Bin 0 -> 52633 bytes
 fig/03-d-rename-branch.JPG (new)                   | Bin 0 -> 59698 bytes
 fig/03-d-source-control-repositories.JPG (new)     | Bin 0 -> 83448 bytes
 fig/03-d-source-control-sub-menu.JPG (new)         | Bin 0 -> 37868 bytes
 fig/03-e-parent-repository-button.JPG (new)        | Bin 0 -> 91453 bytes
 fig/03-e-parent-repository-open.JPG (new)          | Bin 0 -> 76300 bytes
 fig/03-e-select-dessert-folder.JPG (new)           | Bin 0 -> 98664 bytes
 ...03-e-warning-parent-repository-exists.JPG (new) | Bin 0 -> 52839 bytes
 fig/git-freshly-made-github-repo.svg               |   4 +-
 fig/git_staging.svg                                |   2 +-
 fig/github-add-collaborators.png                   | Bin 100892 -> 232665 bytes
 fig/github-collaboration.svg                       |  10 +-
 fig/github-repo-after-first-push.svg               |   6 +-
 index.md                                           |   8 +-
 instructor-notes.md                                |   8 +-
 md5sum.txt                                         |  28 +-
 36 files changed, 835 insertions(+), 675 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2024-10-01 10:03:55 +0000

github-actions bot pushed a commit that referenced this pull request Oct 1, 2024
Copy link
Member

@dpshelio dpshelio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good! Some small changes suggested.

@@ -22,45 +22,47 @@ we can start using it.

We will help Alfredo with his new project, create a repository with all his recipes.

First, let's create a new directory in the `Desktop` folder for our work and then change the current working directory to the newly created one:
First, let's create a new directory in the `Desktop` folder for our work:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
First, let's create a new directory in the `Desktop` folder for our work:
First, let's create a new `recipes` directory in the `Desktop` folder for our work:


Then we tell Git to make `recipes` a [repository](../learners/reference.md#repository)
\-- a place where Git can store versions of our files:
\-- a place where Git can store versions of our files. Click menu `View` and then `Source Control`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\-- a place where Git can store versions of our files. Click menu `View` and then `Source Control`:
\-- a place where Git can store versions of our files. Click the `Source Control` button <img src="https://www.svgrepo.com/show/361322/source-control.svg" atl="Source Control Button" width="30px"> on the left bar (third from the top, or through the `View` menu if the bar is hidden):

It is important to note that `git init` will create a repository that
<img src="fig/03-b-initialize-repository.JPG" alt="03-b-initialize-repository" width=50%>

and you will see `Source Control` which means the repository is created.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and you will see `Source Control` which means the repository is created.
and you will see `Source Control` pannel which means the repository is created.

@@ -69,33 +71,24 @@ we will lose the project's history.

Next, we will change the default branch to be called `main`.
This might be the default branch depending on your settings and version
of git.
of git.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of git.
of git.

Comment on lines +77 to +79
To see branch name, ensure that `Source Control Repositories` is selected. As shown below, the branch is called "project".

```output
Switched to a new branch 'main'
```
<img src="fig/03-d-source-control-repositories.JPG" alt="03-d-source-control-repositories" width=50%>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called project? By default, on a new installed system is either main or mater. I'd suggest to change this bit into:

To see the branch name, you can either see it on the bottom left corner.

<img src="fig/todo/showing the bottom bar of the vs code window>

The source control repository panel is not required.

Comment on lines 131 to +132
repository in a separate directory. To be sure that there is no conflicting
repository in the directory, check the output of `git status`. If it looks
like the following, you are good to go to create a new repository as shown
above:

```bash
$ git status
```

```output
fatal: Not a git repository (or any of the parent directories): .git
```
repository in the directory, check the output of `git status`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't really work in here. There's a setting in VS Code, but we can show the message VS Code shows when trying to open a folder that belongs to a repository:
image
vs opening a folder without a parent repository:
image

Remade those in your theme to keep them consistent.


Jimmy explains to Alfredo how a nested repository is redundant and may cause confusion
Alfredo has managed to create the `dessert` repository inside `recipes`. Jimmy explains to Alfredo how such a nested repository is redundant and may cause confusion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Alfredo has managed to create the `dessert` repository inside `recipes`. Jimmy explains to Alfredo how such a nested repository is redundant and may cause confusion
Alfredo has managed to create the `dessert` repository inside `recipes`.
Jimmy explains to Alfredo how such a nested repository is redundant and may cause confusion

@@ -161,30 +147,22 @@ his last `git init` in the `desserts` subdirectory?

Removing files from a Git repository needs to be done with caution. But we have not learned
yet how to tell Git to track a particular file; we will learn this in the next episode. Files
that are not tracked by Git can easily be removed like any other "ordinary" files with
that are not tracked by Git can easily be removed like any other "ordinary" files by deleting them in VSCode Explorer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that are not tracked by Git can easily be removed like any other "ordinary" files by deleting them in VSCode Explorer.
that are not tracked by Git can easily be removed like any other "ordinary" files by deleting them in the system file browser.

```

Similarly a directory can be removed using `rm -r dirname`.
Similarly a directory can be removed in the same way in Explorer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Similarly a directory can be removed in the same way in Explorer.
Similarly a directory can be removed in the same way in VSCode `Explorer` panel.


But be careful! Running this command in the wrong directory will remove
the entire Git history of a project you might want to keep.
In general, deleting files and directories using `rm` from the command line cannot be reversed.
Therefore, always check your current directory using the command `pwd`.
Further, although the deleted files and directories might be in the Recycle bin which can be recovered, we should not rely on this. Also the "Undo" command in VSCode does not always work to revert a delete command.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Further, although the deleted files and directories might be in the Recycle bin which can be recovered, we should not rely on this. Also the "Undo" command in VSCode does not always work to revert a delete command.
Further, although the deleted files and directories might be in the Recycle bin which can be recovered,
we should not rely on this.
Also the "Undo" command in VSCode does not always work to revert a deleted file or directory.

Into multiple lines. Also, does VSCode "sometimes" work to revert deleted files?

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 this pull request may close these issues.

2 participants