![]() If you would like to go that t after some time, you have to first commit your current changes to ensure that you are free to check out new activities without losing the previous work. git fetch –allĪfter fetching all the tags, you can check out a tag using the command. For that, you have to fetch all the tags to your local repository. To checkout a tag, it should be locally present in your repository. Say you have a project and you want to tag particular points on it. The above example shows the use of the -l option and a wild card expression of -RC that returns a list of all the tags with the specifications given pattern marked with that prefix, earlier used to recognize release candidates. To get a specific list of tags -l can be passed to the command along with a wild card expression: git tag -l *-RC* This gives the list of tags as the output: The commands to create a lightweight tag and an annotated tag are respectively: git tag git tag -a Listing Tagsįor listing the stored tags in a repo, the following command can be used: git tag Lightweight tags are just like ‘bookmarks’ to commit, basically a name that points to a commit and therefore can be useful to create quick links for related commits. The former tags are public, whereas the latter ones are private. Annotated tags and Lightweight tags are different with respect to the total amount of metadata they can store with the prior one storing more data consisting of email, date and tag name. The above example was of a lightweight tag. Git has mainly two kinds of tags – lightweight tags and annotated tags. A common approach is using version numbers like git tag v2.5. To create a new tag, replace with a syntactically similar identifier that identifies the repository point when creating the tag. For creating a new tag, you can execute the following command: git tag
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |