Skip to content

Commit 0c5308a

Browse files
sohomdatta1gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec58344 commit 0c5308a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/gitignore.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ The purpose of gitignore files is to ensure that certain files
146146
not tracked by Git remain untracked.
147147

148148
To stop tracking a file that is currently tracked, use
149-
'git rm --cached'.
149+
'git rm --cached' to remove the file from the index. The filename
150+
can then be added to the `.gitignore` file to stop the file from
151+
being reintroduced in later commits.
150152

151153
Git does not follow symbolic links when accessing a `.gitignore` file in
152154
the working tree. This keeps behavior consistent when the file is

0 commit comments

Comments
 (0)