Get the latest tech news

Archiving Git branches as tags


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

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of tags

tags

Photo of Git Branches

Git Branches

Related news:

News photo

30 years of <br> tags

News photo

Tags to make HTML work like you expect

News photo

Linus Torvalds Grows Frustrated Seeing "Garbage" With "Link: " Tags In Git Commits