Use terminal commands to manipulate what SVN should be aware of

Source: Internet
Author: User
Tags svn update what svn

SVN as the current iOS multi-person development, in the enterprise is also very common, now with more SVN tools such as cornerstone, use more convenient, but there will be some version mismatch and other issues, this article mainly on the use of terminal to operate SVN, if skilled words will be faster.

Command description: Download the server code locally:

1, first, create a local folder to hold the code.

2. Open the terminal and CD into the folder you created.

3, enter the SVN checkout Http://www.XXX.com/XXX/XX/code--username=31575--password=***, this command is to download all the contents of the code folder to local.

So now the code has been downloaded to the local, can be developed by many people ....

If the iOS project was created with Xcode, add is automatically added and no add to the code warehouse is required.

Note 1,: Generally after the code submission, the SVN update update code to ensure that the code version is up-to-date, in this step, if your colleague has just modified the code and uploaded to the server, then there will be a code conflict. If the server does not modify the code, you can submit the code directly: SVN commit-m "Note must be written"

NOTE 2: If you are developing multiple people, do SVN update operations early every day, and svn commit-m "comments" every day before work to minimize code conflicts. (It is best to do an update operation before each commit)

Important: If there is a code conflict, how do I fix it? If there is a code conflict, you will be prompted when update is updated:

(MC) Mine-conflict This means that when a conflict occurs, use my code to overwrite the server's code.

(TC) Theirs-conflict This means using someone else's code when a code conflict occurs, overwriting your own code.

(p) Postpone input p can see its own code and other people's code, the system will generate a lot of files, you can view their own code and other people's code, and to manually resolve code conflicts, you can also merge the two types of code to keep. Note: The system-generated files are not deleted manually.

When manually resolving code conflicts, the extra code generated by the system in the terminal input: SVN resolved file name (the conflicting file name) is automatically deleted. This successfully resolves the code conflict.

Finally attach the Terminal basic command:

CD into a folder,

PWD View current folder path

LS View what files and folders are in the current directory

Delete Deletes a file

Use terminal commands to manipulate what SVN should be aware of

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.