#!/usr/bin/sh # Parse all subdirectories and list git repos encountered. # This oneliner just naively looks for .git folders under subdirectories; it won't catch repos with changed --git-dir. # original source (c) 2016 user1685095 CC BY-SA 3.0 # modified by Alex Starfall 2022 find '.' -type d -execdir test -e '{}/.git' ';' -printf '%P/\n' -prune | tree --fromfile .