On Saturday, 28 July 2012 15:48:04 UTC+1, Trans wrote:
>
> Somehow I have branch that was supposed to be a tag. Not sure how it ever
> became a branch, but now that I have discovered it I am wondering, how do I
> convert the branch into a tag?
>
> Since the name will be the same for both the branch and the tag, I assume
> I can just checkout the branch and tag it.
>
> So now I am thinking I have to delete the branch, but remember its ref id,
> checkout the ref id, and then tag it. Is that right? Any other (easier) way?
>
>
Something like the following will work fine:
First, create a new tag called <name> at the same point as the branch <name>
git tag <name> <name>
Then delete the branch called <name>
git branch -d <name> # You might need -D here
Hope that helps,
Antony
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/git-users/-/sP2qh7XPE0AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/git-users?hl=en.