git-scoper
git-scoper logo

git-scoper

Bulk-apply user.name and user.email to every git repository found under a directory — in parallel, in one command.

View on GitHub
example

Get started in seconds

Pick your preferred method — just git on your PATH is required.

brew tap belaytzev/tap && brew install git-scoper
go install github.com/belaytzev/git-scoper@latest

One command. Every repo.

Managing git identities across dozens of repositories is tedious and error-prone. git-scoper fixes that.

  • Scans a base directory recursively up to a configurable depth
  • Detects all git repositories, including nested ones
  • Applies user.name and user.email via git config --local
  • Runs workers in parallel — fast even across hundreds of repos
  • Reports each path as Updated, Failed, or Skipped

Usage

git-scoper [flags] [base-dir]

If base-dir is omitted, the current directory is used. If base-dir is itself a git repo, config is applied directly and no subdirectory scanning occurs.

Flag Default Description
--depth 2 Max directory depth to scan relative to base-dir.
depth 1 = immediate children only
--workers 4 Number of parallel workers.
Must be ≥ 1
--dry-run false Show what would be changed without applying.
Preview mode — no git config is modified
--version Print version and exit.

Identity resolution

Config is read in order — the first source found wins.

1 · <base-dir>/gitconfig
name=Jane Doe
email=jane@acme.com
2 · ~/.gitconfig (fallback)
[user]
  name  = Jane Doe
  email = jane@example.com

If <base-dir>/gitconfig exists but is missing name= or email=, the tool exits with an error rather than silently falling back.