What are the dangers of working with svn?
I'm about to start working on a large svn repository. Before doing so I'd like to know w开发者_如何转开发hat are some dangerous svn commands that I should be careful around. By dangerous I mean things that cannot be undone, or are difficult to undo.
Also what are some commands that can become dangerous with small typos.
The good part of version control systems in general, including svn
are most changes/mistakes can be reverted.
The things to avoid (or be careful about) are svnadmin
commands. And not modifying the folder holding the repository.
Don't use "admin mode" (svnadmin
) commands unless absolutely necessary. "user mode" commands are quite safe and can be undone, unlike "admin mode" commands which you should almost never use.
One important thing common to all versioning systems is that you shouldn't panic and try to rewrite the history when you make a small mistake. One kind of questions typical on SO is "oh, I committed a lot of bad changes, how do I erase them from the repository" - that's when you're tempted to use "admin mode" commands and risk screwing it. In most cases you don't need to remove those changes (unless you uploaded some sensitive data) - just revert them and move on.
SVN is a versioning tool, not a backup tool. Make sure to take actual backups of the SVN directories regularly.
Be especially careful with moving folders and files around in Finder or Windows Explorer and not to delete any of the hidden files in the .svn directories. (one in each folder).
If you're on a Mac, check out Versions (made by Sofa) which will help make using Subversion much, much easier.
精彩评论