Thread (2 messages) flat view 2 messages, 2 authors, 2026-01-21

Re: .gitignore issue

From: Pushkar Singh <hidden>
Date: 2026-01-21 18:51:06

Hi Alf,

This is expected behavior.
When a directory matches an ignore rule, Git stops descending into it entirely. The pattern

        backup_STOCKS*/

matches directories starting with backup_STOCKS, and once Git prunes traversal at that level, similarly prefixed paths can disappear from git status, which is why backups/ no longer shows up.

This isn’t a bug, but a result of how ignore patterns and directory pruning work.

If you want to ignore only those directories and nothing else, anchoring the pattern helps:

        /backup_STOCKS_*/

You can also verify which rule is responsible with:

        git check-ignore -v backups/

Hope that clears it up.

Best,
Pushkar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help