SVN command line common commands

  
 

Migrating from one SVN server to another:

# Exporting the old server's svn code

svn export {old_svn_url} {path}

# Switch to code Root directory

cd {path}

# Check out svn on the new server to the current directory (recommended that the new svn directory is empty)

svn co {new_svn_url } .

# Add all the code in the current path to the repository

svn add *

# Submit the code to the new server

svn ci -m ‘{svnComment when submit}’

Ignore one or more files or directories

# Ignore a file or directory (set svn attribute: propset)

svn ps svn:ignore “{Files or directories to ignore}” {Location of files or directories to ignore}
Example:
# Ignore _test.php file in main directory
svn ps svn:ignore “_test.php” main/
# Ignore all files or directories in the current directory (wildcards ”*”)
svn ps svn:ignore “*” .

# Ignore multiple files or directories (edit svn attribute: propedit)

svn pe svn:ignore {must Slightly the location of the file or directory}
Description: After entering this command, a text editor (vim or other) will appear, in which you can enter the directory or file to be ignored, one per line, and save it after input.
Example:
_test.php_demo.php_tmp.php

# View a list of files or directories that are ignored in a directory (see svn attribute: propget)

Copyright © Windows knowledge All Rights Reserved