I'm looking for a way to archive a (Git) branch (not export it to a file as the Repository -> Archive... command does.
I've had a brief look at custom actions, but I'm not sure how to get started. What I'd like to do:
- Select a branch in the BRANCHES pane
- Select a (custom?) action "Archive branch to tag"
- If the branch is fully merged:
- a tag is automatically created called "archive/<full-name-of-selected-branch>"
- the selected branch is deleted
I would also like to be able to do the reverse:
- Select a tag in the TAGS pane
- Select a (custom?) action "Restore branch from tag"
- If there is no branch with the same name:
- a branch is created, removing "archive/" from the start of the name
- the selected tag is deleted
Is there an existing way to do this? If not, is it possible to write a custom action to do this?