diff --git a/03-create.md b/03-create.md index b1ccb578cd..73ee2fc994 100644 --- a/03-create.md +++ b/03-create.md @@ -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 @@ -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 @@ -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`. diff --git a/md5sum.txt b/md5sum.txt index efda37655a..341e3146e9 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -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"