How can I add Git tags in Bitbucket?
Asked Answered
A

6

93

I'm hosting my code on Bitbucket using Git. My local client is EGit (eclipse plugin). I created a tag locally (Team -> Advanced -> Tag) and then pushed it to remote repository. But when I open my repository page, I can't find tags there. I'm pretty sure the tag can be seen locally.

I'm not a Git expert. But it seems to me there are several types of tags in Git. Does Bitbucket only show certain types of tags?

Autotomize answered 7/1, 2012 at 21:55 Comment(0)
D
105

Did you click the button "Add All Tags Spec" in Push Wizard in Eclipse? If not, try it. Or if you have access to console version of git just perform:

git push --tags
Deppy answered 7/1, 2012 at 22:3 Comment(0)
C
58

You can also add the tag directly in the Bitbucket UI. Look at Commits, choose a specific commit and then in the details on the right side of the page, click the +-button after No tags.

enter image description here

https://confluence.atlassian.com/bitbucket/repository-tags-321860179.html

Crispi answered 11/6, 2019 at 8:0 Comment(1)
is this the same answer as Brian van Rooijen's (https://mcmap.net/q/224142/-how-can-i-add-git-tags-in-bitbucket), but with a screenshot?Lactation
A
25

This documentation indicates that a tag could be created. Based on that information the following command was constructed:

git tag --annotate 1.0.0 --message "Initial version of some app"

and pushed by issuing:

git push origin 1.0.0

Once pushed, the tag could be downloaded by navigating to https://bitbucket.org/<username>/<project>/downloads?tab=tags

Affection answered 20/12, 2016 at 17:31 Comment(0)
W
22

If you don't know where to look it will take ages to find the button in the gui.

In the bitbucket gui you can add a tag by browsing to commits. When you open the commit you want to tag there is a "tags" section in the top right of the page. Just below where the branch is displayed. If you click the + button you can tag your commit.

We are running the following version: Atlassian Bitbucket v4.8.3

Weissberg answered 18/8, 2016 at 12:34 Comment(3)
This Bitbucket gui tag browse to commits solution also solves the valid-key permissions command line git push --tags issue . Reference answers.atlassian.com/questions/37533680/…Supernatant
Discovered the tag with the Bitbucket gui commit only created a temporary tag. As "admin", I had to go into hooks and temporarily disable the "Push Check" hook. Then the command line "git push --tags" worked.Supernatant
@zerocog, With the latest version of Bitbucket this no longer is a temporary tag.Weissberg
J
2

This is what I had to do, but it seems awfully longwinded. Does anyone know a quicker approach?

rt click on tag under the git repository view. Push Tags, choose remote repo, choose target ref name (ctrl-space) to be refs/heads/master. Select finish.
On the results screen, Select configure select advanced, select add all tags spec, select "finish". This creates a ref mappings in the configure push page with refs/tags/:refs/tags/. Now hit save and push.

Jurisdiction answered 2/5, 2013 at 9:12 Comment(0)
R
1

In the commits, select the Details tab on the right-hand side of the page, scroll down and you can find the tags. Create one if needed.

This is the same answer as @Ogglas has provided. But I'd like to upload a new screenshot since the GUI is changed.

enter image description here

Reactance answered 28/6, 2023 at 10:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.