We use SVN and PhpStorm at work. Recently our team has grown a bit so there are several people working on the same project at a time, sometimes on the same file. We’ve run into the problem where people don’t update before comitting and overwrite the changes that were made by someone else. This is a hassle. I don’t know SVN very well, but it seems like this shouldn’t even be possible. What are we doing wrong?
5
SVN will not just warn you, it will outright refuse the commit. Then you have to do an update, handle any merge conflicts, typically by explicitly marking any conflicted files as “merged”, and only then can you commit.
Of course, it’s possible to have a client that does all this silently and just overwrites conflicted files. Such a client would be considered seriously broken and worse than useless. I doubt PHPStorm does that. Most likely, the developers don’t know how to handle merge conflicts and just incorrectly mark the files as “merged” to get SVN to “work”.
2
Yes, it should and it will. Accidentally erasing your coworker’s work is only possible if you update and resolve all conflicts in your favor, and then commit your version. It is not unthinkable that people have automated their update process so that it automatically chooses “choose my version” because they don’t know any better; find and eliminate such errors.