This is the sixth day of my participation in the August Challenge. For details, see:August is more challenging
- In my previous work, I mostly used Git, and the company I just joined uses SVN, so let me summarize
- SVN is similar to Git in that it facilitates collaboration and remote development
Install the SVN client
- Check whether the operating system is 32-bit or 64-bit
- The operating system is backward compatible, that is, 64-bit software can be installed on 32-bit software
- After the installation is complete, you must restart the COMPUTER for the installation to take effect
- After the installation, check whether the installation is successful by right-clicking the SVN checkout option
Use the client software to connect to the SVN server
- TortoiseSVN-> TortoiseSVN-> Open the repository browser
- Enter the URL manually, for example, SVN :// locallHost
- Click ok, right-click the folder in the window, and click OK. The system will automatically check out the data to the client.
- If a. SVN file is displayed when you open the hidden file, the operation succeeds.
The use of SVN
Checkout checks out the operation
- Link to the SVN server
- Update server data to the local server
- Note: Chekout only operates once on the first link; subsequent update operations use update
Commit Operation
- Submit local data to the server
- Right-click in the folder when the file is added or written
- Note: Chekout only operates once on the first link; subsequent update operations use update
- You will see that the instruction to checkout changes from SVN update and SVN commit
- Click “Submit” and the operation window will appear. The blank window is the remarks of this submission (the same as Git).
- Below, you can select whether to submit all files and the files to be uploaded. After the selection, click OK to submit
As a new member of the team, how to operate?
- Create a new folder locally and get the SVN URL given by the project manager
- TortoiseSVN-> TortoiseSVN-> TortoiseSVN
- In this case, the project file is displayed. Right-click the folder and check out the newly created folder. Click OK
- At this time, the file on the server is checked out to the local, and the current code file is developed. After completion, remarks are made and submitted
File operations on the SVN
- Ignore the function
-
Add a file as TortoiseSVN-> add it to the TortoiseSVN list
-
You can choose single file name, or all files of this type to avoid file upload
- With regard to ICONS, different problems can be found according to different ICONS
- Version rollback
1. After the file is operated and submitted, the version is not suitable for the current service scenario and you want to roll back the version
TortoiseSVN-> Click ‘Update to version’
3. A pop-up window is displayed. You can switch to display logs or version numbers in either of the following ways
4. You can roll back the system based on the log or version number (generally, log rollback is convenient).
5. Select the version you want to roll back and click OK
- Version conflict
1. The concept of conflict is the same as that used in git:
2. Two people update the code and write it, and the first person submits the code
3. If the second person also modifies the same file for submission, conflicts will occur
-
Solution 1: Distribute collaboration
-
Plan development time and separate time
-
Planning development modules to avoid the development of a module by more than one person
-
-
Solution 2: Use the SVN to resolve the version conflict
- 1. Update data from the server to the local device
- Current file. HTML integrated file
- Current file.html. Mine my own content (later submitted file)
- The current file starts with.html.r8
- 1. Update data from the server to the local device
– The current file.html.r9 is a file that has been modified by someone else before relative to the starting file
2. Delete the three files except the consolidated files
3. Modify the ‘integrated file’
4. Submit the file to the server again