Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1086543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:49:36+00:00 2026-05-16T22:49:36+00:00

If you can use a tag only once (unique by commit), what do I

  • 0

If you can use a tag only once (unique by commit), what do I do with 7 commits in tag “Version 7.3“?
I hate that GIT doesn’t make revision numbers (like SVN :)).

I guess a subquestion would be:
What would be a best practice to ‘control’ version numbers (ex revisions, so I want to save major.minor in every commit and DEFINITELY in every branch (I make >= 1 branch per minor)).

The first question has a factual answer (I think).
The second is more of a best practice probe.

Much appreciated! I have learned much GIT from stackoverflow FTW!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:49:36+00:00Added an answer on May 16, 2026 at 10:49 pm

    I’m not sure what your first question is, but I can answer the second question for you.

    Just tag each release. ‘v1.0’, ‘v1.1’, ‘v2.0’. Tags are completely separate from branches, so how you choose to handle tags doesn’t depend on how you choose to handle branches.

    For example, if your repo looks like this:

    A--B--C--D--E  <- master
       \
        --C'-D'-E' <- test_branch
    

    You can apply a tag to branch E' and safely delete test_branch, without losing the code in E'. For this reason, it’s fairly uncommon for people to maintain git branches for historical releases. Tag the release with a version number and feel free to remove any branches you no longer need.

    FWIW, I also use this technique to keep my branches to a minimum. If I go down a dead-end development path on a new branch I can tag that branch (just in case) and remove the branch. If I ever need that code again, I can grab it through the tag.


    Edit re: your comments.

    Exactly my point: “one tag references one commit”? That kinda sucks, no?

    I don’t think it sucks at all. If you want to keep a reference a point in time, you use a tag, if you want to keep a reference to set of changesets, you use a branch.

    @VonC’s mention of git-describe is right on. It’s what I use to inject version numbers into all my code. Anything released to the public will always get a tag, so git describe returns something like, “v1.0”. Internal testing releases will be labeled with something like “v1.0-10-abcd1234”, which indicates that I’m 10 commits ahead of the v1.0 tag and gives hash so I can easily access that commit directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like a tag that I can use to store some necessary info? But really
I'm looking for a modified version of str_ireplace (case-insensitive) that would replace ONLY ONCE.
I'm creating a photo viewer which the user can use to tag images like
Possible Duplicate: Can we use any other TAG inside <ul> along with <li>? Or
Can I use a <video> or <audio> tag to play a playlist, and to
Can an HTML email use an image attachment as the source for tag? Let's
I'm trying to create a custom template tag that only renders a block of
I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without
In using CSS is it best practice to use a div id only once
I've got collection of objects I want use in my custom tag.But I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.