DEV Community

sium_hossain
sium_hossain

Posted on

Represent a directory tree in a Github README.md

Do you want to add your project structure tree in your .readme file?

directory_tree

Install tree



sudo apt install tree


Enter fullscreen mode Exit fullscreen mode

Just type tree inside of your project directory



tree


Enter fullscreen mode Exit fullscreen mode

If you want to ignore a folder from your tree like node_modules, you can do this by



tree -I node_modules


Enter fullscreen mode Exit fullscreen mode

How about you want to ignore multiple folder from your tree, you can do this by



tree -I "node_modules|venv|lib"


Enter fullscreen mode Exit fullscreen mode

Top comments (0)