Reference:
install SVN http://jingyan.baidu.com/article/3c343ff7039de20d37796306.html under Linux
SVN client uses Linux chapter http://jeanlyn.sinaapp.com/svn_linux/
==================================
Introduction to SVN usage
1) Create a directory:
mkdir/home/svn_hl_gg/
cd/home/svn_hl_gg/
2) Download code: Checkout
SVN checkout https://192.168.1.105/svn/gg/.
3) Generate folder, submit code
mkdir 22;
CD 22;
echo Thisis22 >> 22.txt;
CD.;
SVN add 22;
SVN commit-m "Create for GG";//After this step, the code is really uploaded to the server, this time the manager and other members can see this code in the warehouse.
4) Modify the code and upload
VI 22.txt;
[[email protected] 22]# svn commit-m "added version2 for 22.txt"
Sending 22/22.txt
Transmitting file data.
Committed Revision 4.
5) Delete Code
[[email protected] 22]# svn del 22.txt
D 22.txt
[[email protected] 22]# ls
LS See no code, this time because there is no commit, there is still some on the server. But this time with SVN update will not be downloaded to the local. If you want to cancel the operation, you can use SVN revert.
[Email protected] 22]# svn revert 22.txt
Reverted ' 22.txt '
6) Submit Delete
SVN del 22.txt
[[email protected] 22]# svn commit-m "deleted 22.txt"
Deleting 22/22.txt
Committed Revision 5.
This time the code server is also deleted.
7) Download the update:
If the other team members have updated the code repository, add the 22n.txt text. We can update the local code directly within the corresponding folder using SVN update .
[[email protected] 22]# SVN update
A 22n.txt
Updated to revision 6.
8) View the history of the current directory modification:
[Email protected]]# svn log
------------------------------------------------------------------------
R6 | HL | 2016-05-28 09:09:09-0700 (Sat, 2016) | 1 line
22n
------------------------------------------------------------------------
R5 | HL | 2016-05-28 09:04:20-0700 (Sat, 2016) | 1 line
Deleted 22.txt
------------------------------------------------------------------------
R4 | HL | 2016-05-28 09:01:30-0700 (Sat, 2016) | 1 line
Added version2 for 22.txt
------------------------------------------------------------------------
R3 | HL | 2016-05-28 08:18:23-0700 (Sat, 2016) | 1 line
Create a for GG
------------------------------------------------------------------------
Version management tool: Basic use of SVN under Linux