svn co svn://192.168.0.22/mysvn #后面不更任何目录代码更新到命令当前所在的目录
svn co svn://192.168.0.22/mysvn /var/www #更新到/var/www 目录
或者
svn checkout svn://192.168.0.22/mysvn (同上 co 是 checkout 的缩写)
svn up #更新当前所在的目录
svn up ./user.php #更新user.php 文件
svn up /var/www/aa #更新 /var/www/aa
svn add . #增加当前目录到版本库
svn add a.php #增加a.php到版本库
svn commit -m 'test' #提交代码
git clone http://192.168.0.22/a.git
git pull .
git pull a.php
git add a.php
git add .
git status
git commit -m "first commit" #git commit后需要提交
git push #默认提交
git push origin master //提交master 分支
下面是一个git-svn的一般使用流程:
1、git-svn clone svn_repository
2、修改本地代码,使用git add/commit将修改提交到本地git库
3、定期使用git-svn rebase获取中心svn repository的更新
4、使用git-svn dcommit命令将本地git库的修改同步到中心svn库
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.using.html
svn copy sourceURL branchURL
Then, switch to that branch:
svn switch branchURL
And commit your changes:
svn commit
svn switch –relocate http://svn.example.com/path/to/repository/path/within/repository http://svnnew.example.com/new/repository/path/within/repository
deepxl 11月 10th, 2017
Posted In: computer knowledge(电脑知识)