1

We have a Github repo with a single branch 'master' representing stable versions of our code-base.

I want to be able to commit with 'tags' on specific commits that represent 'version' numbers as I've seen people doing.

We use 'SmartGit' to interact with the system, so when I create a new 'Tag' in the local version, I use 'Push Advanced' to create a new tag on the server.

However, none of the commit notes representing my specific changes to a tag are being displayed, and I'm worried that I'm not correctly committing to a specific 'tag' and don't want to overwrite the 'master' branch with a commit of a bugfix in an older version of the code (earlier version).

Anyone done this sort of staggered version control with tags in Github/SmartGit

gitup/smartgit with tagging

2 Answers 2

3

I want to be able to commit with 'tags' on specific commits none of the commit notes representing my specific changes to a tag are being displayed

You can put a tag on a (one) specific commit, but you cannot make "commits" to a tag.
You correctly push through the advanced options of SmartGit that tag to the remote.

But be wary of what commit SmartGit is able to tag: according to its documentation, it only tags the current commit.
That means you have to checkout said commmit first, before tagging it.

Sign up to request clarification or add additional context in comments.

1 Comment

Think of tags like bookmarks. They don't add any content to the page, they just save a spot, with a label. If you intend to maintain multiple versions (i.e. backport fixes on master into old versions) you want to use a branch for those versions, not a tag. Tags should be used to save specific release points ("this is where v1.0.3 was at").
1

Tags are meant as human readable pointer to some specific version of a project; therefore they are immutable. You cannot create commit "on tag" -- Git won't allow it.

What you can do is to create maintenance branch for a given tag, and work on that. For example if you tagged last stable release with v1.3, you can create v1.3.x branch for maintenance (bugfixes) only; you would create there v1.3.1 tags etc.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.