X
17Apr

Migration Process of SVN to Git

Subversion (SVN) is a central version control system (VCS) while Git is a distributed version control system. SVN does some things very well and has been a great source control system. But the features that Git brings – distribution, performance, easy branches, easy merges, stash – are hard to pass up. These two tools have some big differences, but git has more advantage than svn, which is why a lot of companies are now migrating from svn to git. There are several ways to do migration process but now, in this document, we’ll just see the migration process through Git Native commands.

The prerequisites for the svn to git migration process are as follows and we must ensure that the tools below are installed before the migration process begins.

  1. Git Bash
  2. Git – SVN Tool

Git includes an incredibly useful tool, ‘git-svn’ which is a bidirectional connection between Git and SVN. It allows you to pull, and if you so desire push, commits to and from SVN. We recommend avoiding pushing back to SVN because, well, why would you? We’re here to switch, not combine! We’ll just use it to pull down all commit history, branches and tags from SVN.

In a nutshell, git-svn is a git command that allows using git to interact with Subversion repositories. git-svn is part of git, meaning that is NOT a plugin but actually bundled with your git installation.

 

SVN to Git Migration using Windows PC:

The general workflow for this process is:

  1. Firstly, create a local folder in Windows PC.
  2. Initialize a Git repository with the SVN repository.
  3. Fetch from the SVN repository.
  4. Add the Git remote repository.
  5. Finally, Push everything to Git remote repository on the Git host.

Step 1: To start, create a local folder in Windows PC.

3

Step 2: Now, switch to created repository and initialize a git repository with the svn repository.

4

Step 3: Fetch from the SVN repository and saving it in local folder.

5

Step 4: Adding the Git remote repository.

6

Step 5: Finally, Pushing the data from local repository to Git remote repository.

7

SVN to Git Migration using Linux PC:

The general workflow for this process is:

  1. Open Putty.
  2. Login into Linux machine by providing credentials.
  3. Next, Create a directory i.e. > mkdir “Directory Name”
  4. Change the path from root to created directory path i.e. > cd “Directory Name”
  5. Initialize a Git repository with the SVN repository.
  6. Fetch from the SVN repository.
  7. Add the Git remote repository.
  8. Finally, Push everything to Git Repository on the Git host.

Step 1: Open Putty.

1

Step 2: Login into Linux machine by providing credentials.

2

Step 3: Next, Create a directory i.e. > mkdir “Directory Name”

8

Step 4: Change the path from root to created directory path i.e. > cd “Directory Name”

9

Step 5: Now, initialize a git repository with the svn repository.

10

Step 6: Fetch from the SVN repository and saving it in local folder.

11

Step 7: Adding the Git remote repository.

12

Step 8: Finally, Pushing the data from local repository to Git remote repository.

13

That’s it. We have migrated SVN repository to Git using Git native commands. You should now have a functioning Git repository with all your commits, branches and tags from SVN migrated to Git.

Related

Accelerating Digital Transformation with GitHub

Hi All, in this blog I would like to share few insights on how you can leverage GitHub for your deve...

Read More >

GitHub Product Purchasing Details

In the previous blog we would have seen what GitHub is, who started this project and how it evolved ...

Read More >

Intro to Git and GitHub and Difference

Let us check what is Git and GitHub and how they work. To understand this, let us imagine a scenario...

Read More >

Git Command line Options

Git is a free and open source distributed version control system designed to handle everything from ...

Read More >

GitHub - Administration

To understand GitHub, you must first have an understanding of Git. Git is an open-source version con...

Read More >

Integration of Git into Visual Studio

Nearly all versions of the Visual Studio IDE provide integration features for source control. Git Cl...

Read More >

Migrating TFS 2013 Version Control to TFS Git with changeset history

There are several articles on the web describing the migration technique with minimal details. This ...

Read More >

Share

Post a Comment

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Tags
Monthly Archive
Subscribe
Name

Text/HTML
Text/HTML
Contact Us
  • *
  • *