git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: <Patrick.Higgins@cexp.com>
To: <git@vger.kernel.org>
Subject: git branch diagram
Date: Thu, 17 Apr 2008 11:00:56 -0600	[thread overview]
Message-ID: <911589C97062424796D53B625CEC0025E460C3@USCOBRMFA-SE-70.northamerica.cexp.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

I am trying to get my employer to start using git and have found the distributed model and git's branching to be one of the hardest parts to explain and understand. I put together the attached diagram (done with graphviz so some things are not in the most logical place) to help explain things to my coworkers.

Unfortunately, I don't understand things well enough myself to know if the diagram is correct or not. I read in the stgit docs that developing directly in the master branch is discouraged by convention, but I don't really understand why. The git tutorial shows work happening directly in master, so I wasn't sure if that's a convention that only makes sense for stgit or for plain git, too.

In my diagram, I am assuming that most developers work in master, and make branches for their own long-lived projects and experimental things.

Does my diagram make sense? Are there any suggestions or corrections?

Thanks,
Patrick

[-- Attachment #2: git-branching.ps --]
[-- Type: application/postscript, Size: 27107 bytes --]

[-- Attachment #3: git-branching.dot --]
[-- Type: application/octet-stream, Size: 3136 bytes --]

digraph GIT
{
  node[shape = box];
  //clusterrank = none;
  ranksep=1;
  nodesep=.25;
  
  subgraph cluster_rel {
    label = "Release Repo";

    subgraph cluster_rel_t {
      label = "Tracking Branches";
      rel_im[label = "integration/master"];
    }

    subgraph cluster_rel_l {
      label = "Local Branches";
      rel_m[label = "master"];
    }
  }

  subgraph cluster_int {
    label = "Integration Repo";

    subgraph cluster_int_t {
      label = "Tracking Branches";
      int_p1m[label = "project1/master"];
      int_p2m[label = "project2/master"];
      int_p3m[label = "project3/master"];
    }

    subgraph cluster_int_l {
      label = "Local Branches";
      int_m[label = "master"];
    }
  }

  subgraph cluster_project {
    label = "Project Repo";

    subgraph cluster_prj_t {
      label = "Tracking Branches";
      prj_im[label = "integration/master"];
      prj_d1m[label = "dev1/master"];
      prj_d2m[label = "dev2/master"];
      prj_d3m[label = "dev3/master"];
    }

    subgraph cluster_prj_l {
      label = "Local Branches";
      prj_m[label = "master"];
    }
  }

  subgraph cluster_dev1 {
    label = "Dev 1 Repo";

    subgraph cluster_d1_t {
      label = "Tracking Branches";
      dev1_om[label = "origin/master"];
      dev1_d2[label = "dev2/master"];
    }

    subgraph cluster_d1_l {
      label = "Local Branches";
      dev1_m[label = "master"];
      dev1_e[label = "experimental"];
    }
  }

  subgraph cluster_dev2 {
    label = "Dev 2 Repo";

    subgraph cluster_d2_t {
      label = "Tracking Branches";
      dev2_om[label = "origin/master"];
      dev2_d1[label = "dev1/master"];
    }

    subgraph cluster_d2_l {
      label = "Local Branches";
      dev2_m[label = "master"];
    }
  }

  subgraph cluster_dev3 {
    label = "Dev 3 Repo";

    subgraph cluster_d3_t {
      label = "Tracking Branches";
      dev3_om[label = "origin/master"];
    }

    subgraph cluster_d3_l {
      label = "Local Branches";
      dev3_m[label = "master"];
      dev3_test[label = "mytest"];
    }
  }

  legend[shape=record, label="{GIT Branching|Intra-repo arrows are merges|Inter-repo arrows are pulls}"];

  prj_m -> dev1_om
  prj_m -> dev2_om
  prj_m -> dev3_om

  dev1_m -> prj_d1m
  dev2_m -> prj_d2m
  dev3_m -> prj_d3m

  dev1_m -> dev2_d1
  dev2_m -> dev1_d2

  prj_im  -> prj_m
  prj_d1m -> prj_m
  prj_d2m -> prj_m
  prj_d3m -> prj_m

  dev3_m -> dev3_test
  dev1_m -> dev1_e

  dev1_om -> dev1_m
  dev2_om -> dev2_m
  dev3_om -> dev3_m

  dev2_d1 -> dev2_m
  dev1_d2 -> dev1_e

  prj_m -> int_p1m
  int_p1m -> int_m
  int_p2m -> int_m
  int_p3m -> int_m

  int_m -> prj_im

  int_m -> rel_im
  rel_im -> rel_m [style=dotted,label="cherrypick"]

  release_builds[shape=doublecircle,label="Release Builds"];
  rel_m -> release_builds


  build_farm[shape=ellipse,label="Build Farm"]  
  project_builds[shape=doublecircle,label="Project Builds"];
  prj_m -> build_farm [style=dotted,label="on-commit"];
  build_farm -> project_builds

  project2[shape=plaintext];
  project3[shape=plaintext];

  project2 -> int_p2m [style=dotted];
  project3 -> int_p3m [style=dotted];
}

             reply	other threads:[~2008-04-17 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 17:00 Patrick.Higgins [this message]
2008-04-18  1:38 ` git branch diagram Sitaram Chamarty
2008-04-18  2:29 ` Roman V. Shaposhnik
2008-04-18  6:46 ` Karl Hasselström
2008-04-18  8:39 ` Fedor Sergeev
2008-04-18 13:07 ` Matt Graham
2008-04-21  0:30 ` Jakub Narebski
2008-04-21 12:48   ` Matt Graham
2008-04-21 13:06     ` Jakub Narebski
2008-04-21 13:07     ` Luciano Rocha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=911589C97062424796D53B625CEC0025E460C3@USCOBRMFA-SE-70.northamerica.cexp.com \
    --to=patrick.higgins@cexp.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).