views:

127

answers:

1

Hi.

I'm newbie in Git.

I have read: "Pro Git : Maintaining a Project" (book) and Git : Documentation/howto/maintain-git.txt

Tough question for me: how to mantain the old releases without creating a separate long-lived branches. In other words, I am interested how to working with a branch "maint" in the project Git.

In example (merging with topic branches and the integration of contributors of patches are not shown, other branches of "next", "pu" is also not shown here).

These images can be viewed also at here.

          +--master
          |
          +--maint
          |
  (c1)->(c2)
          |
          +--tag : feature-release v1.0

Next time:

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 time:

                               +--master
                               |
                               +--tag:feature-rel v2.0
                               |
   ...->(c)->(c100)->(c101)->(c102)
               /
 ...->(c50)---'
       |
       +--maint
       |
       +--tag:maint-rel v1.0.1

And at this point I have few questions:

  1. What to do with the branch "maint" ? I understand pointer "maint" should be moved in the same position as the "master" ? How ?
  2. Afterwards how then to make a fork of a branch "maint" from branch "master" ?
  3. If appear a patch (elapse a very long time, for example, the current feature-release v10.0 ) for the old "tag:maint-rel v1.0.1", how to integrate it in the "maint" and in "master"?

Thanks.

+2  A: 
VonC