Originally Posted by Valery Reznic
While setgid directory (and umask = 002) technically solve the problem,
what is a reason in the first place for such setup ?
Usually it's mean than one have to use some kind of version control software.
That's a good point. If you have multiple developers that are working on the same set of files, it is far better practice to employ something like Subversion for source control where each developer can maintain their own trunks and then merge those into the production version as needed.
The best part of using a source control software, is that they provide automatic versioning, and allow for code rollbacks to previous versions if something gets broken.
The bottom line is, there are multiple ways to accomplish your goals, you just need to make sure that you're selecting the one that best fits your needs and your environment.