3.5 Handling Releases

Your code is ready for its 1.0 release. It’s time to tag it. Tagging code in Git marks a specific point in the history of the repository so you can refer to it easily. Since this is the 1.0 release, tag it with that number:

 
​prompt> git tag 1.0 RB_1.0

The two parameters specify the name of the tag and the point you want to tag: 1.0 and the branch RB_1.0, respectively. You can view a list of tags in your repository by running git tag without any parameters. Right now, it shows only the 1.0 tag you just created:

 
​prompt> git tag
 
​1.0​

Now that your code is tagged, you need to perform some cleanup. You have two branches, and each contains commits that the other does not know about. ...

Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.