@matheusbsbs / matheus-bagliano / commits / 60e523632f
Fork 0

gitfaq: files in .gitignore are tracked

Add issue in 'Common Issues' section which addresses the problem of Git tracking files/paths mentioned in '.gitignore'. Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shourya Shukla committed May 6, 2020 at 13:30 UTC 60e523632ff7b045a75ed40d8eac26220051ffab
1 file changed +10
Documentation/gitfaq.txt
+10
@@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which
223 can then be copied alongside and modified as appropriate. This second, modified
224 file is usually ignored to prevent accidentally committing it.
225
226 +[[files-in-.gitignore-are-tracked]]
227 +I asked Git to ignore various files, yet they are still tracked::
228 + A `gitignore` file ensures that certain file(s) which are not
229 + tracked by Git remain untracked. However, sometimes particular
230 + file(s) may have been tracked before adding them into the
231 + `.gitignore`, hence they still remain tracked. To untrack and
232 + ignore files/patterns, use `git rm --cached <file/pattern>`
233 + and add a pattern to `.gitignore` that matches the <file>.
234 + See linkgit:gitignore[5] for details.
235 +
236 Hooks
237 -----
238