Initial knowledge of SVN and Git code uploads

Source: Internet
Author: User
Tags using git

Recently started a multi-person project, but never do too many projects, so Google a few people project needs some considerations first 1th: In the multi-person development project to build in their own class, in the creation of the class in the prefix to add their own identifiers used in the name of the zone, to avoid conflict 2nd: When writing code, two developers do not write a class method content at the same time in the same class, which can cause code conflicts when merging code, which can lead to many problems

Git:git is a decentralized way of uploading code, everyone has a complete local repository on their own computer, cloned from the network warehouse is a complete warehouse, everyone can see the entire project's complete code, when the server down or problem, Developers are not going to lag behind in the development process because they cannot pull out of the repository from the server.

SVN:SVN is a centralized code upload method, in the server has the backbone of the Code section, and the backbone part of the branch, to each developer to develop, each developer will branch to complete, then submit the branch code to the backbone section, in addition to the main developer, other developers can not get the skeleton code, Although the source code leaks are effectively prevented, the overall development progress will be affected if the server goes down or a problem occurs

During the development process, I first tried the GIT approach to code merging (Sourcetree), and it went well on the project upload, but there was a code conflict when merging the code, which prevented the project from opening. After review is a question about naming duplicates, But there was no better solution, so it was shelved for the time being.

After using git code merge failed, I chose to try another way svn to upload the merge code, first registered the project account on Svnchina, we use (CornerStone) way to upload code, first we need a good upload environment (network quality good ), if the uplink speed is slow, it is possible to cause the project upload failure, the solution is to upload the backbone of the project to the server, and then we branch out the backbone, the task assigned to each member body, the task is allocated after the test code merge process also produced some problems, Some items can not be update to the local, some local content can not commit to the SVN server, unable to update to the local currently only encountered because of network problems lost part of the file, we update the server code to local, we will encounter some problems in the commit, For example, a file with a hint cannot be committed to the server, we can click on this file, and then at the bottom of the Connerstone select Add to manually update the file to the server, and then submit, if not add to check whether there are duplicate files, and then compare merge, And then submit to the server, we can check out the way to build an SVN dynamic link library on their own computer, using SVN remember not to commit the code at the same time, to stagger the Times to commit the code, otherwise there will be some unknown error;

These are the current understanding and use of SVN and git

Initial knowledge of SVN and Git code uploads

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.