- Create a GIT repository on GitHub.com.
- Create a local repository from the GitHub repository
Use your SSH-Key (uploaded to GitHub.com)!
$ git clone git@github.com:witchi/PHP-SQL-Parser.git
- switch to the new repository directory
- Create a SVN tracking branch, which contains all the SVN changes
$ cd PHP-SQL-Parser
$ git branch --no-track svnsync
$ git checkout svnsync
$ git svn init -s https://php-sql-parser.googlecode.com/svn
- write a file which contains all SVN authors and store it as svn-authors.txt into the Git repository directory
- fetch all revisions from SVN
- set the HEAD of the svnsync GIT branch to the latest SVN revision
phosco@gmx.de = André Rothe <phosco@gmx.de>
greenlion = Justin Swanhart <greenlion@gmail.com>
greenlion@gmail.com = Justin Swanhart <greenlion@gmail.com>
Justin Swanhart = Justin Swanhart <greenlion@gmail.com>
(no author) = Justin Swanhart <greenlion@gmail.com>
$ git svn fetch -A svn-authors.txt
$ git reset --hard remotes/trunk
Merge changes from SVN into Git
- go to the svnsync branch
- get all the new revisions from the SVN repository
- go to the master branch (Git)
- merge all changes from svnsync into the master
- use meld to solve merge conflicts
- upload all changes to the GitHub repository
$ git checkout svnsync
$ git svn rebase -A svn-authors.txt
$ git checkout master
$ git merge svnsync
$ git mergetool
$ git push origin master
Merge changes from Git into SVN
- go to the master branch of Git
- get all changes from the Github repository
- go to the svnsync branch
- get all new revisions from the SVN
- merge all Git changes from master into the svnsync branch (without fast-forward, it creates a new commit point)
- use meld to solve merge conflicts
- commit the changes into svnsync branch (local)
- commit the changes to the SVN repository server (remote)
$ git checkout master
$ git pull origin master
$ git checkout svnsync
$ git svn rebase -A svn-authors.txt
$ git merge --no-ff master
$ git mergetool
$ git commit
$ git svn dcommit