Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,483
Community Members
 
Community Events
184
Community Groups

How to tag a repository or code in the master branch

Tara Pandey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 04, 2023

There is information for this topic at but it does not work.

Repository tags | Bitbucket Cloud | Atlassian Support

None of it looks a real information. Has anybody used this information to tag the whole code in a branch?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 06, 2023

Hello @Tara Pandey ,

Thank you for reaching out to Atlassian Community!

Git tags are attached to commits, not branches. In order to tag a commit in the Bitbucket Cloud UI you can navigate to the repository in question, access the Commits page in the left panel and open the exact commit you want to tag. In the details on the right side of the page, click the + button as in the image below : 

Screenshot 2023-04-06 at 4.46.38 PM.png

You will then need to provide the tag name and an optional description.

Another option is to create the tag in your local clone of the repository and then push it back to Bitbucket. You can follow the below steps to use this approach : 

1. Access the folder of your local clone of the repository

2. Checkout to the commit you want to tag

git checkout <commit hash>

3. Add the tag to the commit using the git tag command 

git tag -a <tag_name> -m '<tag_message>'

4. Push the tag to Bitbucket Cloud

git push origin --tags

Hope that helps! Let me know in case you have any questions :)

Thank you, @Tara Pandey !
Patrik S

Tara Pandey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 07, 2023 • edited

Thank you for your reply @Patrik S.

I knew about the tagging the commit but if I would want to tag the whole source code NOT just the last commit for a Release (release point), can I achieve this but just tagging the last commit in that repository/branch?

I have almost 100 commits by different team members over the course of last 6 months and now I want to release the code, tag it for future refences and move on coding next features but would like to use the same branch for future code pushes.

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 10, 2023

Hello @Tara Pandey ,

When you tag a commit, you are not only including the changes introduced by that particular commit, but rather you are including all the changes before it as well. You can see a tag as the state of your source code at a given point in time. 

So if you tag the latest commit of your repository, when doing check out or clone of that tag locally, it will include all the changes introduced by the previous commits as well.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events