Migrate from SVN to git

Source: Internet
Author: User
Tags svn client git client

Recently dueCodeIn the test phase, several test branches need to be retained locally. The original SVN is not very convenient to use, so the GIT configuration management tool is used instead. Leave a log memo.

Git client and SVN Server

A lot of code still exists in the svn server, so using the GIT client with the svn Server is a good choice, that is, you can experience the benefits of git, you can also retain the original SVN data.

The following are the software that must be installed:

1. Git-1.7.4, which is a git client that can be downloaded from the official git website.

2. SVN client: only the svn client is installed can use tortoisegit to access the svn server. If not installed, you can only access the GIT server.

3. tortoisegit. This tool provides a good git operation interface for Windows users, and it is almost no difficulty for those who are used to SVN.

The relationship between these software is: tortoisegit provides a good interface to operate git, the underlying actual use of the Git-1.7.4 client to complete all git functions, tortoisegit relies on the svn client to submit local Git-managed data to the svn server.

It is best to install the SDK in sequence as listed above; otherwise, you need to manually configure some paths.

 

In this case, you can find the GIT clone option in the right-click menu of windows. With this option, the data on the svn server can be downloaded to the local computer and managed by the GIT client.

For example, to clone data from SVN, you must check the checkbox in the red box, and then fill in the branch name, login user name, and other information. This dialog box is used to clone an existing project from the GIT server.

In this way, you can manage code locally by using a general git client. When uploading code to a remote server, you need to select the svn dcommit command from the right-click menu to submit the code to the svn server.

 

Full use of Git

Of course, if you want to take full advantage of all the features of the GIT configuration management tool, you still need to migrate the server to git. In Windows, you can find many tips on how to configure the GIT server on the Internet. Because Windows does not support SSH, installing the GIT server is troublesome. If you just want to try it out, you can select some public git servers, such as GitHub. The free git servers provided by these platforms must be open-source projects; otherwise, you must pay a certain fee. If you just want to do it yourself, GitHub is enough.

The most important thing here is that you must use puttygen to generate public and private keys and upload them to the GitHub website, the private key can be used locally to access the server through the GIT client.

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.