Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Do not checkout an SVN project into another, local working copy of a Subversion structure node.  This has the potential to create some serious issues when executing Subversion commands, and it will also confuse you.

  • Do not checkout and modify tags of the code.  By convention, a directory representing a tag in SVN, usually with "tag" someplace in the path, should not be modified once created.  Changes should only be made on branches or the trunk.

  • Be careful when using 'svn add' on a directory.  When used without file arguments, the svn add command will include all files all files and subdirectories under that directory into the commit, which may not be your intended outcome.

  • Be careful when using 'svn add' and 'svn commit' without any arguments or with directories.  This may cause many files to be added to the repository that should not actually be tracked and will subsequently need to be removed.  Once a file is added, it is tracked "forever" by the repository and never really deleted unless the repository is rebuilt without that commit included.  So please double check that you are adding only the files which are intended.  Before making a large or complicated commit, first use svn status in your working copy to see what files will be committed or use the -dry-run argument with commit to check first.

  • Use the '--dry-run' argument before executing complex or dangerous commands.  This will show you what will happen without the command actually being executed.

  • Do not be too dependent on the IDE for using Subversion.  Make sure to have a compatible SVN command line client available e.g. where the SVN minor version number is the same as your IDE's "connector" version (Eclipse), so that you are able to execute shell commands.  This can be a pain to setup properly when using Eclipse, so the preferred method of keeping these tools compatible is installing the version of the connector from Eclipse that matches your existing command line client ( e.g. 1.6, 1.7 etc.).

  • Update your working copy regularly.  This will make sure you do not cause conflicts by modifying a file that someone has already made changes to in the repository.

  • Do not develop code in your working copy for an extended period of time without committing it.  This is especially true if there is the possibility that someone else is working on the same file.  When possible, prefer checking in your work at the end of each day, or, at a minimum, the end of every week.

  • Use branches when making an extensive set of complex changes to the trunk.  This will ensure that the trunk is not broken by committing unstable code, and it will also allow you to commit changes that "break everything" without affecting anyone else using the trunk.

More Information

The Red Bean SVN Book is an excellent source of information for all things Subversion.