Sunday, January 27, 2019

Migrate SVN repository to GIT

These are the steps that i followed during the SVN migration to GITHUB repository. svn2git is the utility that i used for this migration.


Prerequisites


 1. You should have git, git-svn and ruby installed. To verify execute below command

sudo apt-get install git-core git-svn ruby
  
2. Install svn2git using following command.

sudo gem install svn2git

Usage:
  • Checkout your svn repository to your local machine by executing below command. 
svn checkout 'repoName' --username 'userName'

  • Execute below command to extract the list of sub version committers. 
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt

  •  Run svn2-git utility (Pass the authors-transform.txt file)
svn2git 'repositoryName' --username 'username' --authors authors-transform.txt

 Note:  If the svn repository is a standard layout of (trunk, branches, tags) at the root level. So doesn't require any addional parameters while using svn2git command.  
  • Once the above command completes you shoud get a local git repository similar to your svn repository. 
  • Add remote origin using below command. 
git remote add origin git@github.com:Company/RepoName.git
  • Push master, all the other branches.
git push origin master
git push origin --all
  • Push Tags to remote git repository by execuing following command. 
git push origin --tags

5 comments:

Ajith said...

Great article!
Thanks for sharing this post!
was very useful

Blog27999 said...

Did you realize there's a 12 word phrase you can say to your partner... that will induce deep feelings of love and instinctual attraction to you deep inside his heart?

Because hidden in these 12 words is a "secret signal" that fuels a man's impulse to love, please and care for you with his entire heart...

12 Words Who Fuel A Man's Desire Instinct

This impulse is so built-in to a man's mind that it will make him work harder than before to make your relationship the best part of both of your lives.

In fact, triggering this mighty impulse is absolutely mandatory to achieving the best possible relationship with your man that the second you send your man one of the "Secret Signals"...

...You'll immediately notice him open his mind and soul for you in a way he never experienced before and he will recognize you as the one and only woman in the galaxy who has ever truly fascinated him.

Blog27999 said...

Did you realize there's a 12 word phrase you can tell your partner... that will trigger intense feelings of love and impulsive attractiveness for you buried inside his heart?

Because deep inside these 12 words is a "secret signal" that fuels a man's instinct to love, admire and look after you with all his heart...

12 Words Who Fuel A Man's Love Instinct

This instinct is so hardwired into a man's mind that it will drive him to work harder than before to do his best at looking after your relationship.

Matter-of-fact, fueling this dominant instinct is absolutely binding to having the best ever relationship with your man that the instance you send your man a "Secret Signal"...

...You will soon notice him open his heart and mind for you in such a way he haven't experienced before and he will distinguish you as the one and only woman in the universe who has ever truly appealed to him.

Blogger said...

Your Affiliate Money Making Machine is ready -

Plus, getting it running is as easy as 1--2--3!

This is how it all works...

STEP 1. Tell the system which affiliate products you want to push
STEP 2. Add push button traffic (it LITERALLY takes JUST 2 minutes)
STEP 3. See how the system explode your list and sell your affiliate products for you!

So, do you want to start making profits???

Click here to check it out

Anonymous said...

Kitez Technology is a first-rated Software training in thoothukudi
and Software testing training in thoothukudi started by an IT professional to act as a bridge between the college and the corporate. Fresh thoughts, talent, and sparkling brain are trained technically.
For more details call @ +91 9994704195