# Windows – how to add the ‘tree’ command to git-bash on Windows

bashgitgit-bashwindows 7

I'm using git-bash on Windows 7. I'd like to see a tree of the current directory. However:

jcollum@DEVELOPER01 ~/Dev/express_coffee
\$ tree .


OK, so I don't have the tree command. How do I install it? I found an article but it was for Macs.

You could also use "cmd //c tree" to use Windows' tree

Explanation:

• Launch cmd with '/c' argument and run tree, then terminate

/C Carries out the command specified by string and then terminates

(extra slash for escaping)

/a use to run with ascii chars in case it doesn't display right.

Answered in greater detail here: https://stackoverflow.com/q/515309/1261166