原Linux命令獲取svn
LVAmber閱讀數(shù):6042018-05-30
從SVN庫提取數(shù)據(jù)
[root@localhost svnpasswd]# ll
total 12
-rws--S--T. 1 root root 1144 May 29 03:36 authz
-rws--S--T. 1 root root? 341 May 29 03:25 passwd
drwxr-xr-x. 2 root root 4096 May 29 05:48 svndata
[root@localhost svnpasswd]# svn co svn://192.168.1.211/sadoc/ /svndata/ --username=alan --password=alan123
也可以通過文件訪問,但是不可以跨網(wǎng)絡(luò)
[root@localhost svnpasswd]# cd svndata/ [root@localhost svndata]# svn co file:///local/svndata/sadoc/ Checked out revision 0.
創(chuàng)建svn項(xiàng)目(主干,分支linux命令大全,版本記錄)保存文件
[root@localhost svndata]# mkdir -p /svn/trunk /svn/branch /svn/tag ;
import
[root@localhost svn]# pwd
/svn
[root@localhost svn]# ll
total 12
drwxr-xr-x. 2 root root 4096 May 29 18:28 branch
drwxr-xr-x. 2 root root 4096 May 29 18:28 tag
drwxr-xr-x. 2 root root 4096 May 29 18:28 trunk
[root@localhost svn]# svn import /svn file:///local/svndata/sadoc -m "import"
Adding /svn/trunk
Adding /svn/tag
Adding /svn/branch
Committed revision 2.
把主干復(fù)制為分支
[root@localhost svn]# svn copy svn://192168.1.211/sadoc/trunk svn:192.168.1.211/sadoc/branch/branch_cms_110329 -m "create a branch by alan modifiy"
svn: Local, non-commit operations do not take a log message or revision properties
批量創(chuàng)建文件并提交到svn庫
[root@localhost svndata]# touch {h..m}
[root@localhost svndata]# ll
total 0
-rw-r--r--. 1 root root 0 May 29 19:21 h
-rw-r--r--. 1 root root 0 May 29 19:21 i
-rw-r--r--. 1 root root 0 May 29 19:21 j
-rw-r--r--. 1 root root 0 May 29 19:21 k
-rw-r--r--. 1 root root 0 May 29 19:21 l
-rw-r--r--. 1 root root 0 May 29 19:21 m
上一個(gè)教程:Linux關(guān)閉防火墻命令
下一個(gè)教程:linux命令大全完整版-linux下scp命令整理