]> git.ipfire.org Git - thirdparty/git.git/commitdiff
docs: clarify git rm --cached function in gitignore note
authorSohom Datta <sohom.datta@learner.manipal.edu>
Wed, 3 May 2023 21:46:40 +0000 (21:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 May 2023 21:59:34 +0000 (14:59 -0700)
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>
Documentation/gitignore.txt

index f2738b10db6b2be5e7babb74fbe013faecd425d1..4c17f2356c40b2fce2c588db97c3abf4f7f262b0 100644 (file)
@@ -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