We need to document this, and I have a feeling we will forget this. (I don't see it in d.o/handbook/git yet.)
To push tags, when you push a branch, also use the --tags option to git push. For example, someone makes a commit on branch 7.x-1.x, and adds tag 7.x-1.0. They would use git push --tags 7.x-1.x.
We should probably put this in the quickstart guide.

Comments

eliza411’s picture

Project: The Great Git Migration » Documentation
Component: Documentation » Missing documentation
Issue tags: +git sprint 9

Moving this to documentation.

Also, git_instructions module is providing the following. If it's not right or not the best way, please also file an issue in that module.

To tag for a release

See the naming conventions for a complete description
of how to tag so you can create a release. Then, with all of your
changes committed and from within a branch of the same
name
:

git tag 7.x-1.0

git push origin 7.x-1.0
eliza411’s picture

Assigned: Unassigned » eliza411
Issue tags: -git sprint 9

The rule is, branch 7.x-1.x and tag the branch with the various tag point releases.

SKAUGHT’s picture

So...I had created the wrong tag and found how to remove it:

git tag -d 12345
git push origin :refs/tags/12345

replace '12345' with the bad name.

---

sorry, hold on might be an issue.

Josh The Geek’s picture

eliza411: That works too, --tags is a shortcut.

Dave Cohen’s picture

Thanks for this post. definately needs to be documented.

But I find even with this, I can't create a new release for my tag! That is I just added a tag, "6.x-3.0-rc9" for my project. But even after the `git push --tags origin` I don't see the new tag on the list of the create project release page. Any idea?

Josh The Geek’s picture

Dave Cohen: Try pushing that tag specifically: git push origin 6.x-3.0-rc9

Dave Cohen’s picture

Really? I don't understand git but I thought a branch might go there but not a tag.

Anyway I tried it, but it seemed to have no effect. Git reported back "everything up-to-date" and drupal.org still does not show that tag as a potential release.

mithy’s picture

I had the same problem. It was because of incorrect tag name. It was 7.x-1.0-alpha and it should be instead 7.x-1.0-alpha1.

eliza411’s picture

Project: Documentation » Git on Drupal.org
Component: Missing documentation » Releases
Assigned: eliza411 » Unassigned
Category: task » support

@Dave Cohen I cloned your project and 6.x-3.0-rc9 is an available tag, so it appears to me that it was successfully pushed. I still don't see it in your releases, though, so I'm guessing it's still unavailable for rolling a release.

I'm moving this from a documentation ticket to a support request. I did clarify several things in the docs in response to this issue, so from my perspective, the doc issue is done.

Dave Cohen’s picture

Thanks, I've already submitted a ticket to infrastructure, where they said essentially, "wait a week". #1092096: Change {versioncontrol_labels}.name collation to be case sensitive on mysql

I'll leave this issue open in case the Git Migration project has any ideas.

eliza411’s picture

Status: Active » Fixed

I check and the Infra ticket is in the right place to get an answer, so I'm marking this issue fixed.

Status: Fixed » Closed (fixed)
Issue tags: -git phase 2

Automatically closed -- issue fixed for 2 weeks with no activity.