Version control switch from SVN to git how to operate

Source: Internet
Author: User
Tags svn

Suppose the current SVN working directory is/var/www/test

1: Find and delete all. svn files

Cd/var/www/test
Find. -name. svn-type-d | Xargs RM-RF

2: Initialize git and submit.


Git init
git Add./*
Git commit-m "Init"

3: If you do not want to put the Git warehouse elsewhere, but only to the local machine, the following actions:

Mkdir/home/user1/git
Cd/home/user1/git
Git init--bare

4: Add the warehouse to the local warehouse:


Cd/var/www/test
git remote add origin/home/user1/git
Git push Origin Master


Note:

The premise of the above operation is that you don't care about SVN log information.

If you need to keep SVN information, you need to investigate other ways to switch to git.

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.