summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShourya Shukla <shouryashukla.oo@gmail.com>2020-05-06 08:00:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-06 18:12:22 (GMT)
commit60e523632ff7b045a75ed40d8eac26220051ffab (patch)
treeb5f2e43ac1d2d1c6bef5e12c2307d01712c40810
parent07d8ea56f2ecb64b75b92264770c0a664231ce17 (diff)
downloadgit-60e523632ff7b045a75ed40d8eac26220051ffab.zip
git-60e523632ff7b045a75ed40d8eac26220051ffab.tar.gz
git-60e523632ff7b045a75ed40d8eac26220051ffab.tar.bz2
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>
-rw-r--r--Documentation/gitfaq.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt
index 1cf83df..11d9bac 100644
--- a/Documentation/gitfaq.txt
+++ b/Documentation/gitfaq.txt
@@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which
can then be copied alongside and modified as appropriate. This second, modified
file is usually ignored to prevent accidentally committing it.
+[[files-in-.gitignore-are-tracked]]
+I asked Git to ignore various files, yet they are still tracked::
+ A `gitignore` file ensures that certain file(s) which are not
+ tracked by Git remain untracked. However, sometimes particular
+ file(s) may have been tracked before adding them into the
+ `.gitignore`, hence they still remain tracked. To untrack and
+ ignore files/patterns, use `git rm --cached <file/pattern>`
+ and add a pattern to `.gitignore` that matches the <file>.
+ See linkgit:gitignore[5] for details.
+
Hooks
-----