This is how I got an old Github repository of WordPress to come up-to-date with the SVN upstream.
I wanted to have a git based repository of WordPress but the most recent one I found in Github was skynet’s one. This repo had been last updated to r11948 in September 2009 so I had to either
- fetch the whole history of WordPress from the svn repo since sometime around 2006,
- clone svn and lose the history or
- clone this git repo add the remote svn from WordPress.org and then update since r11948
The first was out of question has it is both unnecessary and useless, it would also take a shit load of time to complete. The second was something I did not want to resort to has I wanted to keep my repository connected to skynet and it’s other forks inside github. I had to try to clone from github and then somehow connect to the wordpress svn repo.
I have been fiddling around with this for the last few days and has I expected in the end it was quite simple to do. First I forked skynet repository to create one of my own and keep the relation inside of github. This is somewhat unnecessary has I could have just cloned skynet repo directly but i wanted to keep the github network connection. With the github repo forked I cloned the svn repo from wordpress.org from the point in which it was left by skynet. For this I looked into the information of the last update and took the revision number 11948.
This will tell git to clone the svn repository starting after the last revision. Now the repo needs to be brought up to date.
This will get all revisions past the current HEAD and rebase all changes Then I added my github repository to the local configuration.
And now I have fresh WordPress repository in github Thanks in part to fnokd.