-1

I've a Azure Devops pipeline that build commit version and tag in my application.

I use, composer-version minor|major|patch to create application version , that write version in composer.json

Also, i use git push -u origin HEAD:master --tags to commit the version of my application. This command can push the file that have the version, but can't create new tag.

Can someone have an idea about this ?

Quentin Merlin
  • 664
  • 1
  • 6
  • 31

1 Answers1

1

As per the official git doc, git push --tags command only pushes all refs under refs/tags, in addition to refspecs explicitly listed on the command line.

For creating a new tag, you'd have to use:

git tag <tagname>

or for creating an annotated tag:

git tag <tagname> -a

You can then push the tag after you create it. Check this SO post for other detailed discussions on tags in GitHub.

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30