Simply record the configuration steps and usage associated with SVN in a Mac environment. (Mac comes with SVN server and client features, simple configuration can be used)
First, the SVN configuration method
1. Create a warehouse directory, such as a new Svn_code repository in/users/your user record.
Open terminal, enter command: svnadmin create/users/Your user name/svn_code, after the command executes successfully, the result is as follows:
2. Configure SVN user rights, mainly to modify the three files in the/svn_code/conf directory
(1) Open the svnserve.conf and remove the # and spaces before the configuration item below
Anon-access = Read
auth-access = Write
Password-db = passwd
Authz-db = Authz
(2) Open passwd, add account and password under [users]
[Users]
Chenxkang=123
(3) Open Authz, configure user groups and permissions
[Groups]
Topgroup=chenxkang
Use [/] to represent all repositories in the SVN server
[/]
@topgroup =RW
3. Start the SVN server
In the terminal input command: svnserve-d-r/users/your user name/svn_code
If there is no hint, the boot succeeds.
Ii. How to use SVN
1. Importing code from the local to the server
In Terminal input: SVN import Project Address server address--username=chenxkang--password=123-m
2. Download the code from the server side to the local
In terminal input: SVN checkout server address--username=chenxkang--password=123 project address
3. Submit the code to the server
Open terminal, navigate to target code directory, enter: CD Target code directory
Input submission Instructions: SVN commit-m "modified xxx file"
4. Update the server code to local
Navigate to the specified directory before entering the terminal: SVN update
5. For other uses of SVN, you can re-enter the terminal: SVN Help for query.
SVN configuration and usage in MAC environment