]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation: call out commands that nuke untracked files/directories
authorElijah Newren <newren@gmail.com>
Mon, 27 Sep 2021 16:33:48 +0000 (16:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Sep 2021 20:38:37 +0000 (13:38 -0700)
Some commands have traditionally also removed untracked files (or
directories) that were in the way of a tracked file we needed.  Document
these cases.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
Documentation/git-read-tree.txt
Documentation/git-reset.txt

index b1a6fe4499730690777de66558621446e1e58bac..d473c9bf38753ee0786d10e7509a83bde7e58c97 100644 (file)
@@ -118,8 +118,9 @@ OPTIONS
 -f::
 --force::
        When switching branches, proceed even if the index or the
-       working tree differs from `HEAD`.  This is used to throw away
-       local changes.
+       working tree differs from `HEAD`, and even if there are untracked
+       files in the way.  This is used to throw away local changes and
+       any untracked files or directories that are in the way.
 +
 When checking out paths from the index, do not fail upon unmerged
 entries; instead, unmerged entries are ignored.
index 0222a27c5afe44f72f91ef548c9e45b9776d7ef5..8c3aceb832475f25f5712709040033ab2f5fab59 100644 (file)
@@ -38,8 +38,9 @@ OPTIONS
 
 --reset::
        Same as -m, except that unmerged entries are discarded instead
-       of failing. When used with `-u`, updates leading to loss of
-       working tree changes will not abort the operation.
+       of failing.  When used with `-u`, updates leading to loss of
+       working tree changes or untracked files or directories will not
+       abort the operation.
 
 -u::
        After a successful merge, update the files in the work
index 252e2d4e47d10404226cce6abfc0132a4d2e9b74..6f7685f53d5aa054b714690ed57e19b22575d8ba 100644 (file)
@@ -69,7 +69,8 @@ linkgit:git-add[1]).
 
 --hard::
        Resets the index and working tree. Any changes to tracked files in the
-       working tree since `<commit>` are discarded.
+       working tree since `<commit>` are discarded.  Any untracked files or
+       directories in the way of writing any tracked files are simply deleted.
 
 --merge::
        Resets the index and updates the files in the working tree that are