aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitignore.txt
diff options
context:
space:
mode:
authorSohom Datta <sohom.datta@learner.manipal.edu>2023-05-03 21:46:40 +0000
committerJunio C Hamano <gitster@pobox.com>2023-05-03 14:59:34 -0700
commit0c5308af30f7f3a810aa64e74152a8df7c81e87c (patch)
treec1df62265d35da1071fa823d5c03505db6268e32 /Documentation/gitignore.txt
parentec583449067bab5b800ecc63926f35c9dae96fa1 (diff)
downloadgit-0c5308af30f7f3a810aa64e74152a8df7c81e87c.tar.gz
docs: clarify git rm --cached function in gitignore note
Explain to users that the step to untrack a file will not also prevent them from getting added in the future. Signed-off-by: Sohom Datta <sohom.datta@learner.manipal.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitignore.txt')
-rw-r--r--Documentation/gitignore.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index f2738b10db..4c17f2356c 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -146,7 +146,9 @@ The purpose of gitignore files is to ensure that certain files
not tracked by Git remain untracked.
To stop tracking a file that is currently tracked, use
-'git rm --cached'.
+'git rm --cached' to remove the file from the index. The filename
+can then be added to the `.gitignore` file to stop the file from
+being reintroduced in later commits.
Git does not follow symbolic links when accessing a `.gitignore` file in
the working tree. This keeps behavior consistent when the file is