Skip to content

baruffaldi/svn2git-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

svn2git-bash

SVN to GIT repository migrator

This script has been made belong my needings.

I just needed one simple bash script, easy to customize, to migrate a lot of SVN repos to new GIT repos.

It just need:

  • users mapping file
  • SVN source repository
  • GIT destination repository

Optionally you can specify:

  • User name
  • User email

Dependencies

  • git
  • subversion
  • git-svn

Some usage examples

Users mapping file creation

svn log -q | awk -F '|' '/^r/ {gsub(/ /, "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > users.txt

Without user and email:

./svn2git.sh /media/users.txt "file:///media/svn/projects/sound-kiosk/" "https://gitlab.example.com/internal/mobile-applications/sound-kiosk.git"

With user

./svn2git.sh /media/users.txt "file:///media/svn/projects/sound-kiosk/" "https://gitlab.example.com/internal/mobile-applications/sound-kiosk.git" "Filippo Baruffaldi"

With user and email

./svn2git.sh /media/users.txt "file:///media/svn/projects/sound-kiosk/" "https://gitlab.example.com/internal/mobile-applications/sound-kiosk.git" "Filippo Baruffaldi" "filippo.baruffaldi@example.com"

Future implementations

  • better arguments handling
  • users.txt mapping auto create
  • repos authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages