Z
Z
Zakharov Alexander2015-05-25 09:11:39
git
Zakharov Alexander, 2015-05-25 09:11:39

Is it convenient to merge application versions in git with master?

Is it convenient to merge new versions in the git repository with the master branch? In my repositories I keep branches with version numbers, 0.0.1, 0.0.2, etc. Today I paid attention to https://github.com/gitlabhq/gitlabhq/blob/master/C...
b5d88b8b1f384162a795a54b1f082887.png
What is the convenience, besides not having to think about the latest version number? Or is that exactly right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-05-25
Protko @Fesor

In my repositories I keep branches with version numbers, 0.0.1, 0.0.2, etc.

There are tags for this in git. Usually they make a tag for each release + if there is already, say, version 0.1.1, then if you still need to support the previous version, you can make a 0.0.x branch, and already make tags there. So if you find vulnerabilities or bugs in version 0.0.x, you can safely fix it and roll out a minor release. Well, or for example, the bug affects only version 0.2.4, then we again make a commit in the 0.2.x branch that fixes the problem. Also, this commit can either be merged or tiled into other branches that also need this fix. Everything is very tied to how exactly you work.
The master should be stable (some disagree and have a separate release or prod branch for stable code), and the most recent version should be there. Merging master into older branches is sometimes not ok and you just need to understand how you want to build the development process. Actually, if you support version 0.4.x, then it makes little sense to update the changelog for versions 0.5.x, and therefore the most up-to-date changelog in the case of gitlab is stored in master.

E
Espleth, 2015-05-25
@Espleth

No, you misunderstand the essence of branches: they are needed to add new features and refine old ones. Each feature has its own branch. There may be some more features depending on the project. for example, separate branches will be created before the release of a new version, into which all completed features from other branches will be merged and debugged. Once all the tests have been passed and the version has been debugged, you can merge the branch into the master branch, and then upload it.
So in this project, as I understand it, stable branches were created, then they were merged into master and forgot about them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question