Skip to content

Commit 6586242

Browse files
committed
Merge branch 'ss/faq-ignore'
Random bits of FAQ. * ss/faq-ignore: gitfaq: files in .gitignore are tracked
2 parents 3af459e + 60e5236 commit 6586242

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Documentation/gitfaq.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which
223223
can then be copied alongside and modified as appropriate. This second, modified
224224
file is usually ignored to prevent accidentally committing it.
225225

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+
226236
Hooks
227237
-----
228238

0 commit comments

Comments
 (0)