Random helpful hints
Appearance
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