I’ve recently started getting into Git on a personal project, and I can see how a DVCS might benefit us at work (which is a large enterprise software company, currently running Perforce). Feature work in my team for example mostly consists of developers creating their own branches; sometimes these are shared between small teams of developers. I think it would be more efficient in this instance to use a DVCS.
In the more general case, though, I’d be interested to hear from people that use a DVCS at work, in medium to large teams.
- How do you deal with N-way merges? Is this even a common scenario? Mercurial only supports N-way merges by doing (N-1) 2-way merges (and read that this is the preferred solution in other DVCS), which sounds like a very laborious process for even relatively small N.
- Do you use a single central authoritative repository, or is it truly P2P?
- Do developers often push and pull code to and from each other, or does everything go via the central repository?
My team at my previous employer used Git, and it worked well for us. We weren’t all that large (maybe 16 or so, with maybe 8 really active committers?), but I have answers to your questions:
Git was a really great thing for us because of its high degree of flexibility; however, we did have to establish some conventions (branch and tag names, repo locations, scripts, etc, process) or it might have been a little chaotic. Once we got the conventions set up, the flexibility we had was just fantastic.
Update: our conventions basically were thus:
There were other things that you learn as your team gets experienced and learns to work with each other, but this was enough to get us started.
Update: anyone who follows such things by now already knows about it, but Vincent Dreissen has written a solid and pretty comprehensive (but not exaustive) take on branching and release engineering using Git. I would highly encourage using his process as a starting point because for two reasons: