Start by creating a project on github.
In this example we will mirror Sphinx search engine.
On your server or local machine create a new git repository, with the same name of the github repo.
mkdir ~/src mkdir ~/src/sphinx cd ~/src/sphinx git init
Now setup the SVN repository as a remote source to track.
It should be noted that the ‘-T’ switch points git directly to the trunk, which is fine for our purposes.
git svn init -T http://sphinxsearch.googlecode.com/svn/trunk
Perform the initial pull.
git svn fetch
This will take some time, based on the size of the remote repository.
After the first pull is finished, go ahead and run the garbage collector, this will help to speed up things and reduce size.
git gc
I’m going to use a different public key for pushing to github, with no passphrase.
ssh-keygen -t dsa -f ~/.ssh/id_dsa_github_for_mirroring
Now, edit ‘.ssh/config’ and add
Host githubmirror User git Hostname github.com IdentityFile /home/yourusername/.ssh/id_dsa_github_for_mirroring
Now, copy and paste your public key into your github account.
cat ~/.ssh/id_dsa_github_for_mirroring.pub
Add the origin, do the first push.
git remote add origin git@githubmirror:yourgitusername/sphinx.git git push origin master
To keep stuff in sync we need to do
git svn rebase git push origin master
This is an operation you should do every X minutes or so.
Better setup a cronjob to handle that.
mkdir scripts cd scripts nano mirror.sh
and add the following:
#!/bin/sh cd /home/yourusername/src/$1 git svn rebase git push origin master
Save and close the file.
Now edit a crontab entry:
crontab -ePress ‘i’ and start pasting this line:
*/15 * * * * /home/yourusername/scripts/mirror.sh sphinx >/dev/null 2>&1
Press ‘ESC’ and digit ‘:wq!’ to exit.
$1.99 domains with SSL purchase!
I like both the Gamecube and Xbox, we have them in our home office and also in our living room.-”.
wether it is gamecumbe or nintendo wii, what matters is great graphics and ergonomics,;;
i am addicted to computer games that is why i bought a gamecube for me and my brother `”.