webinar : svn to git migration

20
SVN to GIT Migration By: Sanjay Lakhanpal Syed Zaigham Abbas

Upload: newt-global-consulting-llc

Post on 15-Apr-2017

241 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Webinar : SVN to GIT Migration

SVN to GIT MigrationBy:Sanjay LakhanpalSyed Zaigham Abbas

Page 2: Webinar : SVN to GIT Migration

Founded in 2004 ,HQ at Dallas TX, present in multiple locations in USA and India

Leader in DevOps Transformation, Cloud Enablement and Test Automation

One of top 100 fastest growing companies of Dallas twice in a row

Clientele includes Fortune 50 companies

About Newt Global

Page 3: Webinar : SVN to GIT Migration

Speakers

05/02/2023 Copyright 3

• Sanjay is Technical Leader, His area of expertise includes Digital Transformation, DevOps, Test Automation Sales, Delivery and Relationship Management

• He has 20+ years of IT industry experience and delivered multiple enterprise scale projects for Fortune 500 customer base

SANJAY LAKHANPALManaging Director at

Newt Global

• Lead Engineer driving enterprise SCM tool migrations

• Hands on migration experience in migrating SVN & AccuRev to Git

SYED ZAIGHAM ABBASLead DevOps Engineer

Newt Global

Page 4: Webinar : SVN to GIT Migration

Housekeeping Instructions

• All phones are set to mute. If you have any questions, please type them in the Chat

window located beside the presentation panel

• We have already received several questions from the registrants, which will be

answered by the speakers during the Q & A session

• We will continue to collect more questions during the session as we receive and will

try to answer them during today’s session

• In case if you do not receive answers to your question today, you will certainly

receive answers via email shortly

• Thanks for your participation and enjoy the session!

05/02/2023 Copyright 4

Page 5: Webinar : SVN to GIT Migration

SVN to GIT Migration

Introduction

Git’s Features

Benefits of Git over SVN

Migrating from SVN to Git

Demo

Conclusion

05/02/2023 Copyright 5

Page 6: Webinar : SVN to GIT Migration

Git Features

Repositories

URL

Branches

Commits

Commands

Colors

Visualize

05/02/2023 Copyright 6

Page 7: Webinar : SVN to GIT Migration

Git’s Features: Repositories

As Subversion is CVCS (Centralized Version Control System) tool, for each project there is a single repository at some detached central place where all the history is and which you checkout and commit into.

Git works differently, each copy of the project tree (we call that the working copy) carries its own repository around (in the .gitsubdirectory in the project tree root). So you can have local and remote branches.

You can also have a so-called bare repositorywhich is not attached to a working copy; that is useful especially when you want to publish your repository

05/02/2023 Copyright 7

Page 8: Webinar : SVN to GIT Migration

Git Features: URL

In Subversion the URLidentifies the location of the repository and the path inside the repository, so you organize the layout of the repository and its meaning.

Normally you would have trunk/, branches/and tags/directories.

In Gitthe URLis just the location of the repository, and it always contains branches and tags.

One of the branches is the default (normally named master).

05/02/2023 Copyright 8

Page 9: Webinar : SVN to GIT Migration

Git’s Features: Branches

In Subversion branches are just additional folders containing a copy of the code base.When an SVN branch is merged, the branch has to be deleted to prevent an erroneous merge back to trunk in future.

GHE branches however have their own history and revision tree giving you explicit information from where it was forked, what commits have happened and if it has been merged into another branch or not. This makes branch history management much easier.In GHE, the branch history is maintained and is completely traceable. Tracking merge history is a serious problem with SVN.

05/02/2023 Copyright 9

Page 10: Webinar : SVN to GIT Migration

Git’s Features: Commits

Each commit has an author and a committer field, which record who and when created the change and who committed it

Git is designed to work well with patches coming by mail -in that case, the author and the committer will be different.

• Git config --global user.name "Your Name Comes Here" • Git config --global [email protected]

Git will try to guess your real name and email, but especially with email it is likely to get it wrong. You can check it using git config -l and set them with:

05/02/2023 Copyright 10

Page 11: Webinar : SVN to GIT Migration

Git Features: Commands

The Git commands are in the form “git command <command_name>”.

• Eg- “git commit …. “

You can interchangeably use the git-command form as well

• Eg “git-commit ….”

05/02/2023 Copyright 11

Page 12: Webinar : SVN to GIT Migration

Git Features: Colours

• Git can produce colorful output for commands• Colors are disabled by default

05/02/2023 Copyright 12

Page 13: Webinar : SVN to GIT Migration

Git Features: Visualize

05/02/2023 Copyright 13

Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

Watch your repository using the GitHub Desktop viewer as you go.

Page 14: Webinar : SVN to GIT Migration

Git Features: Visualize (Eclipse)

05/02/2023 Copyright 14

Page 15: Webinar : SVN to GIT Migration

Benefits of Git over SVN

05/02/2023 Copyright 15

SVN GIT

Distributed Nature

User Interface Branch Handling

Single Repository Performance

Space Requirements

Page 16: Webinar : SVN to GIT Migration

Importing an SVN repo into git

Prerequisites:

• Get read-only user access for SVN repository• gitsvn utility is available in local environment• Download svn-migration-scripts.jar from

https://bitbucket.org/atlassian/svn-migration-scripts/downloads

Setup Remote GitHub Server

• Get Org. name, team name and members from the respective teams.• Setup Organization.• Setup Team and assign team members.• Create repository and push the code from lab.

05/02/2023 Copyright 16

Page 17: Webinar : SVN to GIT Migration

Importing an SVN repo into git

Create the users list from the SVN

• java -jar ~/svn-migration-scripts.jar authors <SVN Repo URL> > authors.txt

Clone your SVN repo into as a Git

• git svn clone --stdlayout --authors-file=authors.txt <SVN Repo URL> <GitHub Repo Name>

Add the GitHub repository

• git remote add origin <GitHub Repo URL>

Push the code to remote GitHub

• git push –u origin master

Bring the SVN branches and tags as in local Git

• java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git --force

Push the branches and tags to Remote GitHub

• git push --all

05/02/2023 Copyright 17

Page 18: Webinar : SVN to GIT Migration

Demo

05/02/2023 Copyright 18

Page 19: Webinar : SVN to GIT Migration

Contact Us

For any questions/clarifications please contact:

Satheesh Reddy, Sales ManagerNewt Global Consulting LLC.

[email protected]://newtglobal.com/

05/02/2023 Copyright 19

Page 20: Webinar : SVN to GIT Migration

05/02/2023 Copyright 20