
















I keep too many branches alive when I’m working on Chatwoot. A day later I
forget the exact names and end up grepping through git branch output. I wrote
a tiny helper in Fish to show me the branches I touched in the last 24 hours:
| |
git for-each-ref prints every local branch with its committer timestamp, most
recent first.read -l date time zone branch splits that line into pieces so I can get the
timestamp and branch name cleanly.date -d "$date $time $zone" +%s (GNU date on Linux) turns the ISO timestamp
into epoch seconds.date +%s for “now” and keep anything under 86,400
seconds—24 hours.The BSD date on macOS doesn’t support -d. Swap the commit_time line for:
| |
Or brew install coreutils and use gdate -d "$date $time $zone" +%s to match
the Linux version. Everything else stays the same.
$ gbt
2025-08-26 19:14:55 cx-app-perf
2025-08-26 10:02:07 fix-shift-threads
2025-08-26 08:41:33 remove-old-flows
That’s enough to remind me where I should jump back in, and it’s a good nudge that I probably need to graduate these into separate worktrees soon.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。