When we execute, exa --tree with --git-ignore. Paths mentioned in .gitignored are not respected.
#.gitignore
/**/Unsync/**
$ exa --tree --git-ignore
.
โโโ a.pdf
โโโ B
โ โโโ a.pdf
โ โโโ b.md
โ โโโ Unsync
โ โโโ a.pdf
โ โโโ b.md
โโโ b.md
Even I am facing the same problem. The same issue affect --recurse option as well.
Can you try remove the first / char from the line of the .gitignore to see if it works.
Had the same issue with nested node_modules folder.
With exa, this only ignores the top level node_modules, but in git it actually ignores it anywhere in the tree.
#.gitignore
node_modules
Adding this works for exa, but we shouldn't be needing to do this:
#.gitignore
node_modules
*/node_modules
I'm also having the same issue, specifically with __pycache__ folders and .pyc files. My .gitignore has the lines:
__pycache__/
*.py[cod]
which correctly make git ignore all nested __pycache__ and .pyc files, but exa--tree --git-ignore still shows them.
Is there any progress with this issue? I can confirm that exa -T --git-ignore will display contents of the target directory (which is in the .gitignore) when this project is built.
Most helpful comment
Had the same issue with nested
node_modulesfolder.With
exa, this only ignores the top levelnode_modules, but in git it actually ignores it anywhere in the tree.Adding this works for
exa, but we shouldn't be needing to do this: