![]() LIGHTWEIGHT TAGS – This creates a pointer to a specific commit but does not store information like when and who created the tag.ĪNNOTATED TAGS – This creates a pointer to a specific commit and stores information like when and who created the tag with the tag message. Git supports two types of tags lightweight and annotated tags. $ git log -oneline -allĢ06f49c (HEAD -> master) TAGS - second commit for tag demoĭ065fdd TAGS - First commit for tag demo Create Lightweight & Annotated Tags In Git To check the logs for your repository run the following command. ![]() $ git commit -m "TAGS - second commit for tag demo" $ echo "second commit for tags" > ftag2.txt $ git commit -m "TAGS - First commit for tag demo" $ echo "First commit for tags" > ftag1.txt Run the following commands which will create a directory called tags and create two commits. If you wish to follow along, this section will help you in creating a sample repository. Tags are git features and releases are github features where you will create release notes, and generate binaries through CI/CD pipeline like github actions, etc. Tags and releases are related to one another. Using semantic versioning scheme tags are created in the repository. Click on tags and you will see a complete history of tags associated with this project. You will see a section called tags in the repository. To make more sense of how the tag works with a real project, I picked the vagrant project hosted on github. A real use case would be, you may work on bugfix/branch and after a couple of commits, you will be merging the bugfix with the main or release branch where you can create tags and release the next patch version for the product. Tags are nothing but a label for a particular commit in a branch. ![]() In git, these version numberings are created with tags. ![]() When you release your product you will name the release with a version number and these version number follows the semantic versioning scheme. There will be a point when your product is ready to be released for public use. Let’s say your company is working on an open-source project where your team writes code, uses git to version the project, and creates multiple commits. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |