I am new to Git.
I read: "Pro Git: Maintaining a Project" (book) and also Git: Documentation / howto / maintain - git.txt
The tough question for me is: how to store old versions without creating separate long-lived branches. In other words, I am wondering how to work with the "maint" branch in a Git project.
In the example (merging with theme branches and integration of patch contributors are not shown, other branches "next", "pu" are also not shown here).
These images can also be viewed here .
+--master | +--maint | (c1)->(c2) | +--tag : feature-release v1.0
Next:
tag:feature-rel v1.0--+ +--master | | (c1)->(c2)->(c)->(c)->(c)->(c) | +->(c)->(c)->(c) | +--maint | +--tag:maint-rel v1.0.1
Next, as described in "maintain-git.txt", run:
$ git checkout master $ git merge maint
Result:
tag:feature-rel v1.0--+ +--master | | (c1)->(c2)->(c)->(c)->(c)->(c)->(c100) | / +->(c)->(c)->(c50)-----' | +--maint | +--tag:maint-rel v1.0.1
Next:
+--master | +--tag:feature-rel v2.0 | ...->(c)->(c100)->(c101)->(c102) / ...->(c50)---' | +--maint | +--tag:maint-rel v1.0.1
And at the moment I have a few questions:
- What to do with the "maint" branch? I understand that the "maint" pointer should be moved in the same position as the "master"? How?
- Then how to make a fork of the "maint" branch from the "master" branch?
- If a patch appears (the last very long time, for example, the current release version v10.0) for the old "tag: maint-rel v1.0.1", how to integrate it into "maint" and in the "host"?
Thanks.
git branch maintenance
tim4dev
source share