Skip to content

Instantly share code, notes, and snippets.

@UnquietCode
Created August 16, 2013 22:13
Show Gist options
  • Save UnquietCode/6253939 to your computer and use it in GitHub Desktop.
Save UnquietCode/6253939 to your computer and use it in GitHub Desktop.
Converts a git branch to a git tag, by passing in the branch name. Turns a branch "my-branch" into a tag "my-branch.final" and deletes the branch.
git checkout $1
git pull origin $1
git tag $1.final
git checkout master
git branch -d $1
git push origin --tags :$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment