1 month ago
Thurs Nov 20, 2025 8:13am PST
Show HN: Bash functions as CLI utilities to bulk-maintain Git repos
I figured hey might as well drop a show HN, after I commented at https://news.ycombinator.com/item?id=45925109 "CLI tool to check the Git status of multiple projects"

Because it's kind of nicer to roll your own, if you do it functional-programming style.

  ls_git_projects ~/src/ | take_active | count_repos_by_remote

  ls_git_projects ~/src/bitbucket | take_stale | proc_repos git_fetch # only stale repos

  ls_git_projects ~/src/bitbucket | proc_repos git_branch_current # all repos
Each function is a line or five. Source the whole `bulk-git-ops` file in the shell and get cli TABTAB completions as one does for normal cli tools.

I do this opportunistically, but if I go back to maintaining lots of repos (release manager), then I'll just have it sourced in my shell at startup.

read article
comments:
add comment
loading comments...