git how to archive a branch

C++
git tag archive/<branchname> <branchname>
git branch -d <branchname>

Source

Also in C++: