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

  1. Check whether the operating system is 32-bit or 64-bit
  2. The operating system is backward compatible, that is, 64-bit software can be installed on 32-bit software
  3. After the installation is complete, you must restart the COMPUTER for the installation to take effect
  4. 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

  1. TortoiseSVN-> TortoiseSVN-> Open the repository browser
  2. Enter the URL manually, for example, SVN :// locallHost
  3. Click ok, right-click the folder in the window, and click OK. The system will automatically check out the data to the client.
  4. If a. SVN file is displayed when you open the hidden file, the operation succeeds.

The use of SVN

Checkout checks out the operation
  1. Link to the SVN server
  2. Update server data to the local server
  3. Note: Chekout only operates once on the first link; subsequent update operations use update
Commit Operation
  1. Submit local data to the server
  2. Right-click in the folder when the file is added or written
  3. Note: Chekout only operates once on the first link; subsequent update operations use update
  4. You will see that the instruction to checkout changes from SVN update and SVN commit
  5. Click “Submit” and the operation window will appear. The blank window is the remarks of this submission (the same as Git).
  6. 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?
  1. Create a new folder locally and get the SVN URL given by the project manager
  2. TortoiseSVN-> TortoiseSVN-> TortoiseSVN
  3. In this case, the project file is displayed. Right-click the folder and check out the newly created folder. Click OK
  4. 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
  1. Add a file as TortoiseSVN-> add it to the TortoiseSVN list

  2. 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

– 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