Hacker News new | ask | show | jobs
by kjksf 182 days ago
Because in git tooling (be it github.com or a tui/gui client like lazygit), git branches are shown more prominently because the expectation is that a branch is something you actively work on (if you're finished with a branch, you delete it).

If you don't anticipate working on a branch but you want to preserve the code you leave it but it starts to clutter that prominent "active" space in most git tools.

This allows you to preserve the code (if you ever want to look at it again) while also de-cluttering the prominent "branches" view.

1 comments

How would this argument change if git branch recognized the "archive/" convention, or had some other mechanism, such that archived branches are concealed from view unless -a/--all is given?

I like the idea that branch names starting with . (period) are considered hidden, similarly to files in Unix.