Git for Windows (https://gitforwindows.org/) (has Git Bash) but it does not include
tree is available for via
pacman (Package Manager) but that is only available if you install "Git for Windows SDK" (scroll to the bottom of gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)
This SO: "Package management in git for windows?" was very helpful
Also as commented in the above SO, they link to this git for windows issue [Pacman missing on fresh 2.5.2 install #397] that it was intended to not include
pacman in the default install.
Anyways, I installed "Git for Windows SDK", then in it's bash prompt (SDK-64) I ran the
following to install current tree v1.7.0-1 (as of this posting Aug 30, 2018):
[SDK-64: Bash Terminal for Git for Windows SDK]
pacman -S tree
Proceed with installation? [Y/n] Y
On my system, Git for Windows SDK is installed under:
C:\git-sdk-64, so from my Git for Windows Bash shell (that did not have tree installed), I copied it over tree.exe to it's /usr/bin directory, e.g.
[MINGW64: Bash Terminal for Git for Windows]
cp /c/git-sdk-64/usr/bin/tree.exe .
Now I can run
tree v1.7.0 from both Git Bash shells.
So, to make it even easier for others and maybe myself on a future machine, I looked at where
pacman was getting the
tree package from by running following in my Git for Windows SDK Bash terminal:
$ pacman -S --info tree
Repository : msys
Name : tree
Version : 1.7.0-1
Description : A directory listing program displaying a depth indented list of files
Architecture : x86_64
The key thing, here is that
pacman is getting it from the "msys" repository (FYI: even though it says msys, it really is using msys2), so I looked at
/etc/pacman.d/mirrorlist.msys and the first mirror points to
So next time you want a package that is NOT in Git for Windows, you can download them from: http://repo.msys2.org/msys/x86_64/ (for 64-bit) or from http://repo.msys2.org/msys/i686/ (32-bit)
e.g. direct download link for tree v1.7.0-1