Versions Compared

Key

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

...

If you really want to experiment with some of the more advanced commands (branching, merging, copying, etc.) you might think about setting up your own test repository as doing this kind of stuff on an actual production repository if you are just testing or fooling around is not recommended!polite.

 

Checkout a Folder from SVN

...

No Format
svn co svn://example.org/repo/some/dir

svn:// is the protocol ( for talking to communicating with the SVN server).

example.org is the host name of the SVN server.

repo is the name of the SVN repository (SVN Servers servers can have multiple repositories).

some/dir is a folder in the repository.

You could also may checkout the entire repository.

...

No Format
svn rm rel/path/to/file1 rel/path/to/file2

The deletion will occur in the repository when you commit.

When you execute the rm command, Subversion will not by default leave a local copy of the file and so will delete it immediately!

...

This command is used to commit your local changes to the repository, including deletions, changes and additions which have been done on the working copy.

No Format
svn commit -m "committing some stuff" path/to/file1 optional/path/to/file2

Usually it is good to include a list of files that should be specifically affected by the commit.  Otherwise, you may inadvertently commit changes.

Files must be explicitly added or deleted in order to be included in a commit using the add or rm sub-commands (described above).

Any changes to files that SVN knows about in the working copy will be included in the commit automatically.

Copy Files

Similar to how a file system works, files can be copied to directories.  In Subversion, this will essentially " fork " the file from the source version of it where it can be independently changed.

Here is an example of making a copy of a file with a new name.

...