I have a spicy git alias that allows me to "archive" old git branches by converting them to tags, making them less visible across git tooling.
# ~/.gitconfig
[alias]
archive-branch = "!f() { \
: git switch; \
local git_branch=${1:-$(git branch --show-current)}; \
git co main && \
git tag archive/$git_branch $git_branch
You add more tags?
In my main work projects I regularly archive tags into
refs/archive/tags/*- which is hidden from normal tooling, but still accessible in Git and (some?) Git tooling and UIs.Branches get “path” prefixes like
draft/*or other longterm category indications. I don’t archive them, but if I would, I would put them into non/refs/headslike/refs/archive/heads/*.