Documentation: call out commands that nuke untracked files/directories

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>

Elijah Newren committed Sep 27, 2021 at 16:33 UTC 0e29222e0c2f68118cdd3412515539b74433b732
3 files changed +8 -5
Documentation/git-checkout.txt
+3 -2
@@ -118,8 +118,9 @@ OPTIONS
118 -f::
119 --force::
120 When switching branches, proceed even if the index or the
121 - working tree differs from `HEAD`. This is used to throw away
122 - local changes.
121 + working tree differs from `HEAD`, and even if there are untracked
122 + files in the way. This is used to throw away local changes and
123 + any untracked files or directories that are in the way.
124 +
125 When checking out paths from the index, do not fail upon unmerged
126 entries; instead, unmerged entries are ignored.
Documentation/git-read-tree.txt
+3 -2
@@ -38,8 +38,9 @@ OPTIONS
38
39 --reset::
40 Same as -m, except that unmerged entries are discarded instead
41 - of failing. When used with `-u`, updates leading to loss of
42 - working tree changes will not abort the operation.
41 + of failing. When used with `-u`, updates leading to loss of
42 + working tree changes or untracked files or directories will not
43 + abort the operation.
44
45 -u::
46 After a successful merge, update the files in the work
Documentation/git-reset.txt
+2 -1
@@ -69,7 +69,8 @@ linkgit:git-add[1]).
69
70 --hard::
71 Resets the index and working tree. Any changes to tracked files in the
72 - working tree since `<commit>` are discarded.
72 + working tree since `<commit>` are discarded. Any untracked files or
73 + directories in the way of writing any tracked files are simply deleted.
74
75 --merge::
76 Resets the index and updates the files in the working tree that are