0

I'm trying to upload a tag to a specific commit but the tag goes up and the files do not go up with it.

What should I do?

I am inside my X branch and from there I used the following commands:

git tag -a vfv.1.0.0-homo COMMIT_TOKEN
git push origin fv.1.0.0-homo
Andrejs Cainikovs
  • 27,428
  • 2
  • 75
  • 95

1 Answers1

0

Tag is a reference to a commit. You have to push your commits first.

This is the workflow to push commit(s) with a tag:

git push <remote> <branch>
git tag -a <tag> <sha>
git push <remote> <tag>
Andrejs Cainikovs
  • 27,428
  • 2
  • 75
  • 95
  • Note that `git push ` will actually send the commit. It just won't update the *branch name*. You can do both in a single push by running `git tag -a ; git push `. – torek Feb 21 '19 at 17:18
  • Also, there's now the `--follow-tags` option on push, you can `git tag -a $tag master; git push --follow-tags origin master` and it'll find all the new tag objects pointing into the new history and send them along. – jthill Feb 21 '19 at 17:27