在本地搭建 SVN 教程

SVN 使用教程

以下内容参考自:SVN使用详细教程_大梦谁先觉i的博客-CSDN博客_svn使用教程

一、SVN 安装

1.1 软件下载

软件打包地址:https://melephant.lanzoue.com/iXRj50hnm5oh

1.2 VisualSVN Server 安装

双击「VisualSVN-Server-5.1.1-x64.msi」进行安装,安装图解如下所示:

image-20221203190209638
image-20221203190223099
image-20221203190314967
image-20221203190920141
image-20221203191112547
image-20221203191134362
image-20221203191152886

安装完成后可勾选复选框:
image-20221203191305239

出现如下窗口,则表示安装成功:
image-20221203191348451

1.3 TortoiseSVN 安装

双击「TortoiseSVN-1.14.5.29465-x64-svn-1.14.2.msi」进行安装,安装图解如下所示:

image-20221203191459041
image-20221203191513899
image-20221203191707214

image-20221203191740127
image-20221203192209777

在桌面任意空白的地方「右键」,出现如下内容,则表示安装成功:
image-20221203192335320

二、SVN 配置

2.1 设置 IP 和端口

打开服务器,选择「Configure authentication options…」:
image-20221203192549835

设置 Server name (建议使用当前IP):
image-20221203192738201

Server name 的值可以设置为:

  1. 127.0.0.1 (只能本地自己访问)
  2. 电脑用户名(只能本地自己访问)
  3. 当前 IP(能够 ping 通 IP 的用户均可访问)

Server Port 使用默认值即可。

2.2 新建账号密码

  1. 右键「Users」选择「Create User...」:
    image-20221203193059821

  2. 设置用户名和密码:
    image-20221203193227475

    2.3 新建分组

    1. 右键「Group」选择「Create Group...」:
      image-20221203193506936
    2. 自定义分组名称,并为分组添加用户:
      1

三、SVN 使用

3.1 新建仓库

右键「Repositories」,选择「Create New Repository…」:

image-20221203194248826
image-20221203194307182

image-20221203194415061
image-20221203194554911
image-20221203194728791
image-20221203194839001

3.2 本地项目导入 SVN

  1. 拷贝远程仓库的地址:
    image-20221203195006454

  2. 选择任意项目,右键选择「Import...」:
    image-20221203195744178

    image-20221203200629724

  3. 选择永久接受:
    image-20221203200722488

  4. 输入账号密码(步骤 2.2 创建的用户名和密码):
    image-20221203200825805

导入成功后可在服务器中看到的效果:

image-20221203200929630

3.3 将远程仓库的项目检出至本地

  1. 复制要下载的项目的远程地址:

    image-20221203201143110

  2. 在需要检索项目的目录中,右键选择「SVN Checkout…」:
    image-20221203201309887

  3. 输入远程地址,设置项目的存放位置:
    image-20221203201500567

posted @ 2022-12-04 15:22  MElephant  阅读(1326)  评论(0编辑  收藏  举报