Skip to content

Git utilities for developers who knead to understand their repos

License

Notifications You must be signed in to change notification settings

jdevera/git-this-bread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍞 git-this-bread

Let's git this bread β€” tools for developers who knead to understand their git repos

Go Version License: MIT Go Report Card

A collection of git utilities, freshly baked in Go. Vibe-coded.

Tools

Package Tools Description
git-explain git-explain See contribution status across repositories
git-as git-id, git-as, gh-as Identity switching for git and GitHub CLI
gh-wtfork gh-wtfork What the fork? Triage years of GitHub forks

Installation

Homebrew (recommended)

brew install jdevera/tap/git-this-bread

This installs: git-explain, git-id, git-as, gh-as, gh-wtfork

Go install

# Install all at once
git clone https://github.com/jdevera/git-this-bread && cd git-this-bread && go install ./cmd/...

# Or one by one
go install github.com/jdevera/git-this-bread/cmd/git-explain@latest
go install github.com/jdevera/git-this-bread/cmd/git-id@latest
go install github.com/jdevera/git-this-bread/cmd/git-as@latest
go install github.com/jdevera/git-this-bread/cmd/gh-as@latest
go install github.com/jdevera/git-this-bread/cmd/gh-wtfork@latest

πŸ₯– git-explain

See your contribution status across repositories at a glance.

Ever wonder which repos in a folder are yours, which are forks, and which are just clones you grabbed and forgot about? git-explain rises to the occasion.

What it shows

  • πŸ” Your commits β€” how many commits you've made (by matching your user.email)
  • 🍴 Fork detection β€” identifies repos where you have an upstream remote
  • ☁️ Your remotes β€” highlights remotes containing your GitHub username
  • πŸ“ Dirty status β€” staged, modified, untracked files with line counts
  • ⬆️ Unpushed commits β€” don't leave your dough unproofed
  • πŸ“¦ Stashes β€” forgotten stashes you should deal with

Requirements

Set your git identity so git-explain knows who you are:

git config --global user.email "you@example.com"
git config --global github.user "yourusername"

Usage

# Analyze all repos in a directory
git explain ~/projects

# Analyze a single repo with verbose output
git explain ~/projects/my-repo -v

# Show as a table
git explain ~/projects -t

# Output as JSON
git explain ~/projects --json

# Get advice on what to do
git explain ~/projects --advice

# Get LLM-powered advice (requires OPENAI_API_KEY or ANTHROPIC_API_KEY)
git explain ~/projects --llm-advice

# Use Anthropic instead of OpenAI
git explain ~/projects --llm-advice --llm-provider anthropic

# Add custom personality to LLM advice
git explain ~/projects --llm-advice --llm-instructions "be encouraging and use baking puns"

Example output

 chezmoi  ξœ₯ master   origin   3   2025-11-13   modified:1 +21/-0 untracked:3  fork
 command-launcher  ξœ₯ main   origin   12   2025-10-20   modified:1 +2/-0 untracked:3   4 unpushed   1 stash  fork
 ddns-updater  ξœ₯ json_api   origin   3   2026-01-06   untracked:1   1 stash  fork
 ebookatty  ξœ₯ explicit_cli_output_format   origin   2   2026-01-04  fork
 grc  ξœ₯ master   origin   1   2015-02-03   modified:52 +130/-146   1 unpushed  fork
 homepage  ξœ₯ size_formatter   origin   4   2024-08-26  fork
 mirror-to-gitea  ξœ₯ skip_forks   origin   5   2024-07-20   untracked:1  fork

Verbose output

 command-launcher
    ξœ₯ main
     Remotes:
        origin β†’ git@github.com:jdevera/command-launcher.git (mine)
        upstream β†’ git@github.com:criteo/command-launcher.git
     12 commits by you
     Last commit: 2025-10-20
     modified:1 +2/-0 untracked:3
     4 unpushed
     1 stash

    Branches with your commits:
        ● main                            10 commits  (2025-10-20)
        β—‹ self_updater_version_compare    7 commits  (2025-08-02)
        β—‹ docs_linting                    6 commits  (2025-02-20)
        β—‹ command_name_in_env             5 commits  (2024-08-26)

Flags

Flag Short Description
--verbose -v Detailed multi-line output with branches
--compact -c One-line output (default for multi-repo)
--table -t Compact table view
--all -a Include non-git directories
--json Output as JSON
--advice Show actionable suggestions
--llm-advice Enable LLM-powered advice (requires API key)
--llm-provider LLM provider: openai (default), anthropic
--llm-instructions Custom instructions for the LLM
--no-cache Bypass LLM advice cache
--per-repo Analyze each repo individually with LLM
--legend -l Explain icons and colors
--quiet -q Suppress progress output

πŸ₯― git-id

Manage git identity profiles for multi-account workflows.

Juggling personal and work GitHub accounts? git-id stores identity profiles in your git config so you can switch contexts without kneading through config files.

What it stores

Each profile can have:

  • πŸ”‘ SSH key β€” path to the private key for this identity
  • πŸ“§ Email β€” git author/committer email
  • πŸ‘€ User β€” git author/committer name
  • πŸ™ GitHub user β€” username for gh-as

Usage

# List all profiles
git-id

# Create a new profile interactively
git-id add personal

# Show profile details
git-id show personal

# Set a single field
git-id set personal email me@example.com

# Remove a profile
git-id remove personal

Example output

$ git-id
  personal: me@example.com (gh: myuser βœ“)
  work: me@company.com (gh: work-user βœ“)

$ git-id show personal
Profile: personal
Source:  /Users/me/.gitconfig

  sshkey: ~/.ssh/id_personal βœ“
  email:  me@example.com
  user:   My Name
  ghuser: myuser βœ“ authenticated

πŸ₯¨ git-as

Run git commands with a specific identity.

Use your identity profiles to run git commands with the right SSH key and email β€” no more pushing with the wrong account.

Usage

# Clone with your personal identity
git-as personal clone git@github.com:user/repo.git

# Push with your work identity
git-as work push origin main

# Commit as a specific identity
git-as personal commit -m "Fix bug"

How it works

git-as sets environment variables and execs git:

  • GIT_SSH_COMMAND β€” uses the profile's SSH key
  • GIT_AUTHOR_EMAIL / GIT_COMMITTER_EMAIL β€” uses the profile's email
  • GIT_AUTHOR_NAME / GIT_COMMITTER_NAME β€” uses the profile's name (if set)

πŸ₯ž gh-as

Run GitHub CLI commands with a specific identity.

Switch between authenticated GitHub accounts for gh commands.

Requirements

The GitHub user must be authenticated with gh auth login before use.

Usage

# List PRs as your personal account
gh-as personal pr list

# Create an issue as your work account
gh-as work issue create

# Clone a repo as a specific user
gh-as personal repo clone owner/repo

How it works

gh-as creates a temporary config directory with a hosts.yml that selects the specified user, then execs gh with GH_CONFIG_DIR pointing to it.


🍴 gh-wtfork

What the fork? Analyze your GitHub forks.

You've accumulated mass amounts of repositories after years of compulsive open source contribution. You no longer know what's yours and what's not. Tell apart the projects you're actively maintaining from that fork you made in 2010 to correct a typo.

What it shows

gh-wtfork categorizes your forks into three groups:

  • Maintained β€” you're ahead on the default branch (keeping your own version)
  • Contributions β€” not ahead, but has branches or PRs (contributing back upstream)
  • Untouched β€” no changes at all (can probably delete)

For each fork, you'll see:

  • How far ahead/behind upstream, and when (is upstream dead? is your fork stale?)
  • Your branches with age and associated PR status (open, merged, or closed)
  • Whether that old branch is finished business or still pending

Usage

# Show active forks (hides untouched ones)
gh-wtfork

# Show all forks including untouched
gh-wtfork --all

# Run as a specific identity
gh-wtfork --as work

# Output as JSON
gh-wtfork --json

Example output

● Maintained
🍴 jdevera/command-launcher
    ↑ criteo/command-launcher
    ↑ 12 ahead (3mo ago)  ↓ 45 behind (upstream: 2d ago)
    βŽ‡ feature-branch  2025-10-20 Β· 4mo ago
        πŸ”€ merged #89 Add self-update version comparison

β—‹ Contributions
🍴 jdevera/acme.sh
    ↑ acmesh-official/acme.sh
    ↓ 441 behind (upstream: 2d ago)
    βŽ‡ multideploy-yaml  2025-08-31 Β· 6mo ago
        πŸ”€ merged #4521 Add multi-deploy YAML support
    βŽ‡ patch-1  2025-09-01 Β· 6mo ago
        βœ– closed #4530 Fix typo in README

License

MIT β€” Do what you want, just don't blame me if your bread burns.

About

Git utilities for developers who knead to understand their repos

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages