#!/bin/sh # git find-repos [DIRS] - list all git repos below DIRS (or current directory) find "${@:-.}" -name HEAD -execdir sh -c \ 'git rev-parse --resolve-git-dir . >/dev/null 2>/dev/null && pwd' ';'