I have some old branches in my git repository that are no longer under active development. I would like to archive the branches so that they don\'t show up by default when r
Here is an alias for that:
arc = "! f() { git tag archive/$1 $1 && git branch -D $1;}; f"
Add it like this:
git config --global alias.arc '! f() { git tag archive/$1 $1 && git branch -D $1;}; f'
Bear in mind there is git archive command already so you cannot use archive as an alias name.
Also you can define alias to view the list of the 'archived' branches:
arcl = "! f() { git tag | grep '^archive/';}; f"
about adding aliases