SVN Command Line Interface

SVN generally comes pre-installed on Mac OS X.  However, if you need to install it then the easiest way is to first install  HomeBrew and then to use the commands below to install SVN.

$ brew options subversion
$ brew install (OPTIONS) subversion

Here are a few notes on using SVN…

svn --version   		# Tells version number of SVN installed on machine

svn help			# Get help on SVN and show list of available commands
svn help [COMMAND]		# Get help on a particular command

svn info [TARGET]		# Prints info about TARGET
				# If TARGETq is blank then current directory is used
				# TARGET can be local or remote (svn://physics.wku.edu/phys316) 
						
svn list [TARGET]		# Print directory listing of each TARGET file...
svn ls [TARGET]			# Same as 'list'

# Some UNIX Commands
ls				# Prints directory listing of current working directory
ls -la				#  l = one entry per line, a = show all files (even hidden)
cd [PATH]			# Change current directory
pwd				# Print working directory full path
mkdir DIR			# Creates a directory (folder)

svn checkout URL [PATH]		# Checkout [co] a working copy from a repository at URL to PATH

svn status [PATH...]		# prints status of working copy files and directories
				#  With no args, prints only locally modified items
				#  With -q, print only summary information about locally modified items.
				#  With -u, add working revision and server out-of-date information.
				#  With -v, print full revision information on every item.

svn add PATH			# Put files and directories under version control, scheduling them
				#  for addition to the repository on the next commit.
svn add --force PATH		#  use --force to force operation to run.

svn commit -m "message" PATH	# Sends changes from working copy to repository
				#  A message is required, but it may be empty.
						
svn delete PATH			# Remove files and directories from version control.
				#  Can also use del, remove, or rm.
				#  Each item specified by a PATH is scheduled for deletion upon
				#  the next commit.  Files, and directories that have not been
 				#  committed, are immediately removed from the working copy
  				#  unless the --keep-local option is given.

svn delete URL			# Each item specified by a URL is deleted from the repository
  				#  via an immediate commit.
  						
svn update [PATH...]		# Bring changes from the repository into the working copy.