Lihn1987, the easiest way to establish svn In ubuntu (reposted to the famous author, thank you)
Recently I am studying opengl and have written some code, but I am afraid that the Code will be lost and the code will be modified by mistake. What should I do? So I thought of using the version management tool.
In linux, it is most appropriate to use svn.
Method
First, prepare software tools. ubuntu is quite convenient to install software.
Sudo apt-get install subversion
OK
Create a repository folder:
Cd/home
Sudo mkdir svn
/Usr/local/svn # sudo chown-R 777 svn
/Usr/local/svn # sudo chmod-R 777 svn
The last command grants the group members the corresponding permissions on all files added to the file warehouse.
The permission should have been added to the corresponding group, but since it is the simplest method, it is omitted.
Create a repository
Sudo svnadmin create/home/svn
Modify the conf/svnserve. conf file under svn
Remove # Before [general]
[General]
# Anonymous access permission, which can be read, write, or none. The default value is read.
Anon-access = none
# Authenticate the user's permissions, which can be read, write, or none. The default value is write.
Auth-access = write
# Remove the path of the password database #
Password-DB = passwd
Modify the configuration file passwd
If modified
[Users]
Fly li = 123456
Then start the svn Service
Svnserve-d-r/home/SVN
Finally, import the svn Project
SVN import-M "New Import"/home/test SVN: // localhost/SVN
In this way, the project in the/home/test folder is imported into SVN, and the-M parameter indicates that the message is what we will see when viewing the svn log in the future.
Then let's test it.
Sudo mkdir/home/svn_down
CD/home/svn_down
Sudo SVN Co SVN: // localhost/SVN
Check whether the files in SVN have been downloaded?
Haha, I wish you a successful configuration.
If you encounter problems, you can leave a message or contact lihn1987@gmail.com
Finally, thank you for visiting benboha.