一、安装Homebrew
网址:https://brew.sh/
1.下载
终端输入:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2.输入电脑密码回车
3.Next steps提示还要输入两条命令
查看是否安装成功:brew -v
二、下载svn
brew install subversion
查看是否安装成功:svn --version
三、使用svn客户端功能
1.从本地导入代码到服务器
终端:svn import /Users/apple/Documents/eclipse_workspace/weibo svn://localhost/mycode/weibo --username=name --password=123456 -m "init"
2.从服务器端下载代码到客户端本地
终端:svn checkout svn://localhost/code --username=name --password=123456 /Users/apple/Documents/svncode
3.查看当前目录的更改状态
终端:svn status
4.提交更改过的代码到服务器
终端:
svn add 文件名
svn commit -m "修改了xx文件"
5.更新服务器端的代码到客户端
终端:svn update