How to get tree -a to ignore .git directories?
You need to use the -I flag to exclude a pattern:
tree -a -I '.git'
Hope it helps.
I wrote a node based clone of tree called tree-fiddy that honors gitignore settings. It's pretty alpha right now, but it's working fine on my machines.