-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
First section, before git init
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:
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:
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 |
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\-- 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of git. | |
of git. |
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%> |
There was a problem hiding this comment.
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.
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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
No description provided.