Jump to content

Random helpful hints

From NicheWork
Revision as of 12:01, 20 January 2026 by MarkAHershberger (talk | contribs) (branch search)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a list where I record (currently) random helpful hints that I've discovered.

Find which git branch the work you want is stored on

I keep several branches going all at once, so sometimes I remember the tool I need (e.g. server-info in pyproject.toml) but not where I left it.

$ git branch --format='%(refname:short)' | xargs -I {} sh -c 'git show {}:pyproject.toml 2>/dev/null | grep -q "server-info" && echo "Found in branch: {}"'
Found in branch: hosts-query-tool