In my Githubs repos documentation I want to represent a directory tree structure like this:
Simple tree
command will do the job. For example: tree -o readme.md
will print the tree structure of your current working directory and write it to readme.md
. Then open readme.md file in one of text editor like Sublime and wrap its content within a pair of triple backticks (```).
FYI: you might have to brew install tree in OSX if it's not already installed. In Linux and Windows it should just work fine. Also in windows you might have to replace hyphen with forward slash.
I hope this helps.