[Cialug] Git 'philosophy'
Colin Burnett
cmlburnett at gmail.com
Fri Dec 18 16:17:59 CST 2009
On Fri, Dec 18, 2009 at 10:15 AM, L. V. Lammert <lvl at omnitec.net> wrote:
> Does anyone use Git in a consulting environment? Here is the situation:
>
>> I work from two or three different machines, and need to maintain a
> repository for my 'work'
>> There are other possible developers, so I have already setup a 'master'
> repository at the client.
>
> I had originally thought that having my OWN 'working' repository would
> allow me to share environments between office, laptop, & netbook, but git
> does not seem to like two repositories (at least I can't get it working).
>
> So, the question - is maintiaing a 'work' repository and a 'master'
> respository a valid topology?
If you setup a bare repo at your clients then you consider that your
"master" (i.e., production code comes from here). If you setup a
"master" in your office (i.e., $work) then you have to keep $work in
sync with $master. Keep a branch on $work that tracks $master for
every branch on $master [1] that you care about.
The question is do you want all the work you do on your machines to
appear at the client or do you want all your work to be one monolithic
commit at the client? If the former then all your branches on your
machines have to track branches on $work that track $master. If the
latter then you need to setup extra branches on $work that your
machines track and work on; and when you're finally ready to merge
$work into $master then you do it in $work on the branches that track
$master.
I presume the latter since you don't want mid-fix commits (i.e.,
commits you do so you can sync from office to laptop before leaving)
to appear at the client.
Make sense or not?
Colin
[1]: At my work we setup a branch for each version. So Foo-1.0.0 and
Foo-1.0.1 are branch names and the first commit is 1.0.0.1 and
1.0.1.1, respectively. IOW, we never edit the master branch (which is
just a symbol and has no real intrinsic meaning anyway).
More information about the Cialug
mailing list