Archiving Git Branches as Tags
4 months ago
- #shell-completion
- #aliases
- #git
- A git alias 'archive-branch' converts old branches to tags, making them less visible.
- The alias supports shell completion for tab-completing the branch to archive.
- The alias uses a bash function and a hint to git for completion style.
- Requires the official git completion script; zsh users need additional setup.
- On macOS, link git-completion.zsh and modify .zshrc for proper functionality.
- Original idea credited to a Reddit thread.