Skip to content

Instantly share code, notes, and snippets.

@ko31
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ko31/b5632a068c3acd17ffdf to your computer and use it in GitHub Desktop.
Save ko31/b5632a068c3acd17ffdf to your computer and use it in GitHub Desktop.
【svn】svnでリポジトリ作成する手順
リポジトリ:/opt/repos/projectname
ソース:/var/www/html
# リポジトリ作成
$ mkdir /opt/repos/projectname
$ svnadmin create /opt/repos/projectname
$ svn mkdir -m "created default directory" ¥
file:///opt/repos/projectname/trunk ¥
file:///opt/repos/projectname/branches ¥
file:///opt/repos/projectname/tags
# ソースは別ディレクトリに退避、新しいディレクトリにチェックアウトする。退避したソースを戻してインポート。
$ cp -Rp /var/www/html /var/www/html_
$ cd /var/www/html
$ rm -rf ./*
$ svn co file:///opt/repos/projectname/trunk .
$ cp -Rp /var/www/html_/* ./
$ svn import -m 'made initial import' . file:///opt/repos/projectname/trunk
# リポジトリ管理したくないディレクトリを無視設定してコミット
$ svn propset -R 'svn:ignore' '*' /path/to/ignoredirectory
$ svn ci -m 'set ignore directory'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment