From bf85101cf3829008beb7941983b5ca675d6ad6fa Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Wed, 23 Jun 2021 03:13:09 +0100 Subject: [PATCH] Added trivia about worktrees, added explanation about why the exercises could be useful. --- index.html | 84 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 01a3448..527f835 100644 --- a/index.html +++ b/index.html @@ -140,9 +140,24 @@ function listdir(dirname) {
-

Example working directory

+

Example working tree

Our imaginary user will create a proj directory, and start filling in some files.

+
+

+ A working tree designates the directory (and the subdirectories and files within) in which + the user will normally view and edit the files. GIT has commands to save the state of the working tree + (git commit), in order to be able to go back in time later on, and view older versions of the files. + The command git worktree allows the user to create multiple working trees using the same + local repository. This effectively allows the user to easily have two or more versions of the project + side-by-side. GIT commands can be invoked in either copy. It is worth noting that the .git/ + directory exists only in the original working tree; while it is safe to remove other worktrees (followed by + an invocation of git worktree prune from one of the remaining working tree to let GIT + detect the deletion), the removal of the original working tree will discard ths .git/ + directory, and all versions of the project that have not been published elsewhere (usually via + git push) will be lost. +

+
@@ -1362,17 +1377,36 @@ commands.