For archive the branches that are no longer used I created a function in my .zshrc file (or .bashrc). The content of the branch is saved in a new tag and subsequently deleted.
To make this process faster I created this function in my .zshrc file (or .bashrc).
function archive_branch() {
date=$(date '+%Y-%m-%d')
git checkout master
git tag archive/$date-$1 $1
git branch -D $1
git branch -d -r origin/$1
git push --tags
git push origin :$1
}
In console runs like this:
archive_branch fix-bug-123
This will remove the branch you want to archive and create a tag with its content in the following format:
archive/2020-01-08-fix-bug-123
regards