Exa: `exa --tree` with `--git-ignore`

Created on 12 Aug 2019  ยท  5Comments  ยท  Source: ogham/exa

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

Most helpful comment

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

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skyzyx picture skyzyx  ยท  4Comments

atomi picture atomi  ยท  5Comments

wkschwartz picture wkschwartz  ยท  6Comments

simnalamburt picture simnalamburt  ยท  6Comments

grigorii-horos picture grigorii-horos  ยท  4Comments