Git Developer Guide

How to find and list all Git repositories on a Mac

The Fast Terminal Command

To list all Git repositories under your home directory without descending into dependency trees or backup folders:

# Search up to depth 5, pruning when .git is found
find ~ -maxdepth 5 -name .git -type d -prune 2>/dev/null | sed 's/\/\.git$//'

If you use fd (a fast alternative to find):

fd -H -I -t d '^\.git$' ~ --exec dirname {}

Why an ongoing inventory matters

Over time, developers clone forks, experiments, and client repositories across multiple folders (~/Projects, ~/personal, ~/Downloads, ~/src). A static terminal list doesn't tell you which of those repos are dirty, which need pushes, or which are in sync with GitHub.

The easier way: GitMon

GitMon keeps an active, live inventory of all your local Git repositories directly in your menu bar with zero battery drain. Filter instantly by clean, uncommitted, unpushed, or stale.

Download GitMon Free Trial Learn more

Related Guides