Use git and svn, and use gitsvn

Source: Internet
Author: User
Tags svn update

Use git and svn, and use gitsvn

Projects on the server are managed using svn.

Originally, local projects were managed through svn. However, when svn Branch functions were used for project testing/new functions, various problems always occurred, and git was switched.

Because the git branch mechanism is different from the svn Branch Mechanism, git is more flexible, powerful, and stable.

First, create a local git repository (which must be created in an empty folder)

Check the project checkout on the server to the created git repository. The project status in the soureTree changes.

Then we will find many svn-related things that need to be ignored. (*. Svn)

In this case, you need to add the project to git through regular operations (save and submit ).

The first time you fill in the submitted information, you will be prompted to enter the user name and email address (these can be entered at will, because these are used to mark the git project, but the format must be correct)

After the submission is successful, you can view it in the submission history.

Now the master will exist as the main branch of the project, and subsequent project updates will be carried out on the Branch to ensure the stability and integrity of the project.

Create a branch based on the master node

Because "new branch is checked" is selected, the current branch is branch.

Modify the branch content. Save and submit.

By viewing historical submissions, you can see that no new content has been added to the master branch.

Then, change the current branch to master and merge the branch content to the master branch.

The master information is successfully merged.

If a conflict occurs in the merge statement, you can submit the statement again.

The prompt after the conflict is like this:

Now there is no problem, you can follow the normal svn update process to submit the new master content to the remote server.

Git itself provides git svn-related operations, but it is easy to understand and handle it based on your understanding of git and svn usage.

Related Article

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.