Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
eliza411 CreditAttribution: eliza411 commentedMoving 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
Comment #2
eliza411 CreditAttribution: eliza411 commentedThe rule is, branch 7.x-1.x and tag the branch with the various tag point releases.
Comment #3
SKAUGHTSo...I had created the wrong tag and found how to remove it:
replace '12345' with the bad name.
---
sorry, hold on might be an issue.
Comment #4
Josh The Geek CreditAttribution: Josh The Geek commentedeliza411: That works too, --tags is a shortcut.
Comment #5
Dave Cohen CreditAttribution: Dave Cohen commentedThanks 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?
Comment #6
Josh The Geek CreditAttribution: Josh The Geek commentedDave Cohen: Try pushing that tag specifically:
git push origin 6.x-3.0-rc9
Comment #7
Dave Cohen CreditAttribution: Dave Cohen commentedReally? 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.
Comment #8
mithy CreditAttribution: mithy commentedI 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.
Comment #9
eliza411 CreditAttribution: eliza411 commented@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.
Comment #10
Dave Cohen CreditAttribution: Dave Cohen commentedThanks, 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.
Comment #11
eliza411 CreditAttribution: eliza411 commentedI check and the Infra ticket is in the right place to get an answer, so I'm marking this issue fixed.