Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : 8cb8e6c
Branch  : main
Author  : erinmgraham <erin.graham@jcu.edu.au>
Time    : 2024-07-03 08:17:26 +0000
Message : Merge pull request #992 from martinosorb/martinosorb-patch-1

Further warnings in rm exercise
  • Loading branch information
actions-user committed Jul 3, 2024
1 parent 75d6a34 commit e263f09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions 03-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ fatal: Not a git repository (or any of the parent directories): .git
## Correcting `git init` Mistakes

Wolfman explains to Dracula how a nested repository is redundant and may cause confusion
down the road. Dracula would like to remove the nested repository. How can Dracula undo
down the road. Dracula would like to go back to a single git repository. How can Dracula undo
his last `git init` in the `moons` subdirectory?

::::::::::::::: solution
Expand All @@ -183,14 +183,14 @@ that are not tracked by Git can easily be removed like any other "ordinary" file
$ rm filename
```

Similarly a directory can be removed using `rm -r dirname` or `rm -rf dirname`.
Similarly a directory can be removed using `rm -r dirname`.
If the files or folder being removed in this fashion are tracked by Git, then their removal
becomes another change that we will need to track, as we will see in the next episode.

### Solution

Git keeps all of its files in the `.git` directory.
To recover from this little mistake, Dracula can just remove the `.git`
To recover from this little mistake, Dracula can remove the `.git`
folder in the moons subdirectory by running the following command from inside the `planets` directory:

```bash
Expand All @@ -199,6 +199,7 @@ $ rm -rf moons/.git

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`.


Expand Down
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"index.md" "9944fa80d27d4d21044683f3efaca6eb" "site/built/index.md" "2023-11-20"
"episodes/01-basics.md" "78184e84f5bf3b0dd88de3918e927591" "site/built/01-basics.md" "2024-06-20"
"episodes/02-setup.md" "5abb7879c09c68c0dbcdec08705ee755" "site/built/02-setup.md" "2024-05-28"
"episodes/03-create.md" "dfce27947f22c48521fc5f9872784b6d" "site/built/03-create.md" "2024-06-20"
"episodes/03-create.md" "0c2c1076fc278fdc3ae71170aa73d8b5" "site/built/03-create.md" "2024-07-03"
"episodes/04-changes.md" "57b35b367e731cf7f620cc0a3841f441" "site/built/04-changes.md" "2024-06-20"
"episodes/05-history.md" "6b54b47be5244afc368d49e4f99dfbf1" "site/built/05-history.md" "2024-06-20"
"episodes/06-ignore.md" "0683eb66e0a84b5297827704a1010c7b" "site/built/06-ignore.md" "2023-09-18"
Expand Down

0 comments on commit e263f09

Please sign in to comment.