Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates a tag with a common format for an old branch, gives instructions to delete.
#!/bin/bash
git tag -a archive/$1 $1 -m "Archive of branch $1."
echo "Branch: `git rev-parse $1`"
echo "Tag: `git rev-list -n 1 archive/$1`"
echo "Run: git push origin --delete $1"
echo " git branch -d $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment