Git Create and push tag(s) in GIT


Example

Create a tag:

  • To create a tag on your current branch:

    git tag < tagname >
    

    This will create a local tag with the current state of the branch you are on.

  • To create a tag with some commit:

    git tag tag-name commit-identifier
    

    This will create a local tag with the commit-identifier of the branch you are on.

Push a commit in GIT:

  • Push an individual tag:

    git push origin tag-name
    
  • Push all the tags at once

    git push origin --tags