Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Start Subversion Repository with Initial Import (See related posts)

// description of your code here

On the server (cannot be done remotely)
svnadmin create /var/svn/repository_name


On the client with the files to check in
svn import svn+ssh://myserver.com/var/svn/repository_name

You MUST use full path if using svn+ssh. If using HTTP, full path is not necessary.

Then erase the entire directory, and checkout the files from Subversion in order to make the current directory a working copy. Be careful and copy the directory to a backup directory before deleting all files and checking out a working copy.
cd ..
mkdir bak_directory
cp -R my_directory bak_directory
cd my_directory
rm -rf *
svn co svn+ssh://myserver.com/var/svn/repository_name .

Don't forget that period at the end of the checkout (co) statement. It will create the directory if you forget the . (current directory) optional parameter which will result in my_directory/my_directory/[your files]

You need to create an account or log in to post comments to this site.