Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what do you think about versioning with "git tag" instead of brancing like v1.5.5 etc. #398

Closed
hkulekci opened this issue Jan 28, 2013 · 19 comments

Comments

@hkulekci
Copy link
Contributor

I think, "git tag" can be used to save all versions of project instead of branching like v1.5.5.1 or v1.5.5 etc. All versions can be downloadable from website but this method is more comparable instead of downlad from website. Website can be linked to directly github tag for following versions. Maybe, it is more complex for manager but some versions are stable and developers can see all versions to download. These stable versions can be controlled and some critical version bugs can be fixed from tags.

What do you think about this situation?

Examples some open source projects are forked a lot :
https://github.com/twitter/bootstrap/tags
https://github.com/pokeb/asi-http-request/tags
https://github.com/henon/GitSharp/tags

@opencart
Copy link
Collaborator

i have no idea how to do this

@uksitebuilder
Copy link
Contributor

I found this page useful for Tags

http://git-scm.com/book/en/Git-Basics-Tagging

@hkulekci
Copy link
Contributor Author

First of all, you can create a tag when you change a version with following codes.

git tag -a v1.5.5 -m "my version 1.5.5"
git push origin v1.5.5 

After that, You can commit with default way.

git add files 
git commit -m 'message'
git push origin master/branches

Then, you can create a new tag with same way when the version will changed.

@hkulekci
Copy link
Contributor Author

if you want to send a commit specific tag ot project, you can use following codes :

git checkout tags/v1.5.5 
git add files
git commit -m 'message'
git tag -a v1.5.5.1 -m 'message'
git push origin v1.5.5.1

it is not easy, but I think it can be done.

@opencart
Copy link
Collaborator

i don;t use command line

@uksitebuilder
Copy link
Contributor

me neither for the most part

i use git for windows from the git homepage

It has a powershell tool built-in which can be used for little things like adding tags, updating forked repos from the original

@myHelloWorld
Copy link

I vote for "hkulekci" suggestion. Tagging should be used instead of branching when releasing a new version. I just learned the difference of tagging and branching here: http://stackoverflow.com/questions/1457103/what-is-the-difference-between-a-tag-and-a-branch-in-git .

@ghost
Copy link

ghost commented Jan 30, 2013

I don't see how this is feasible when features and bug fixes are developed concurrently.

@hkulekci
Copy link
Contributor Author

the project version is change if someone change something on v1.5.5 version as v1.5.5.1 or v1.5.5.2,... etc. For example, you create a tag as 1.5.5. after that you change something and you want to add some other commits to v1.5.5. You should either create v1.5.5.1 tag of project or remove v1.5.5 tag and create again with new commit. I think second one is not recommended. Because puspose of version control system show all revison and version changes of projects. if i use v1.5.5 on my project or what ever, i see v1.5.5.1 and open it and i can see what is the changes. This method will make it easier to write changelog.

@uksitebuilder
Copy link
Contributor

At the time 1.5.5.1 was released, a new tag should have been set

A new branch 'called 'development' created to add new features for the next version

Any bugfixes to 1.5.5.1 should have meant a new point release 1.5.5.2 etc and new tags for each point release on the master

Once development on new features in the development branch are complete, merge develpment branch with master and set new tag on master for 1.5.6 or 1.6 or whatever - Master should now contain all bugfixes and new features

delete development branch

create new developemnt branch from master

@ghost
Copy link

ghost commented Jan 30, 2013

And what value is all this extra work adding over simple branching?

@hkulekci
Copy link
Contributor Author

Because all changes is merged when branch was delete. Version differences can be found only changelogs. For example, i dont know what the real difference is between v1.5.5 and v1.5.5.1.
it is a suggestion, only. I understand you. You and someothers asks "Why am i use these all process? Branching is easy." Ok. i understand.

@ghost
Copy link

ghost commented Jan 30, 2013

You can still tag within a branch I'm sure. I just don't see the value in replacing branches completely. How would you fix a bug in a previous release that isn't found in the current version, for instance?

@opencart
Copy link
Collaborator

i think this conversation is not required. i do not know how to add tags and can see nothing on tortoise git about them.

@rb2
Copy link
Contributor

rb2 commented Jan 31, 2013

In TortoiseGit context menu:

----
Switch/Checkout
Merge
Create Branch
Create Tag
...

Tag is a simple bookmark in the history. And as a bonus it allows have easy download for bookmarked version.

@Ictinus
Copy link
Contributor

Ictinus commented Jan 31, 2013

This might be helpful.
http://nvie.com/posts/a-successful-git-branching-model/

@tkahl
Copy link

tkahl commented Jan 31, 2013

@Ictinus: thanks for the link - nice article. After all i have learned about Git, I personally would say, tagging is the "correct" way to mark a version / release. Tagging is for versions, branching for development :)

@rb2 rb2 mentioned this issue Apr 26, 2013
@chorvus
Copy link

chorvus commented Apr 27, 2013

You can still tag within a branch I'm sure. I just don't see the value in replacing branches completely. How would you fix a bug in a previous release that isn't found in the current version, for instance?

A tag points to a single commit and should be consistently named.
Various fixes backported to earlier versions could just contain a revision increment (following the major.minor.build.revision version naming pattern).

Branches often contain the history of commits regarding a specific topic (could be a major feature or a release preparation) that cannot be developed concurrently with the trunk code (which in this case is master). Hence the name, branching, you branch from a specific point in time (see commit) to work independently. It's then up to the developers to decide what to do with that work, which is usually merging into the original branch (even if that is already commits ahead) or tagging it's last commit (also known as head).

Hope that helps :)
Alex

@leo72
Copy link

leo72 commented Apr 29, 2013

Tagging is for versions, branching for development ++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants