[Git learning 4] Git-based git tags Projects

Source: Internet
Author: User

Tag: git

1. Background
Today I learned how to tag a project, modify the tag version number for this project, and then directly push the version number to the server, which is much easier and easier to manage the project.
2. Tag 1. query existing tags. You can use the GIT tag command to query a specific version. You can use git tag-l 'v *'
git tag
2. Create a tag for the version
git tag -a v1.4 -m ‘my version 1.4‘

3. view the added tag, git show command
git show



4. You can also add tags to a previous commit.
git tag -a v1.2 9fceb1941agege


5. In this way, when pushing code, you can directly push the tag (1) push a version
git push origin v1.5
(2) Push all labels
git push origin --tags




/********************************

* This article is from the blog "Li bogarvin"

* Reprinted please indicate the source: http://blog.csdn.net/buptgshengod

**************************************** **/


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.