UsingMirrorWithGitSvn
If you’re committing directly to the WebKit subversion repository, or for some other reason need to make sure you’re completely up to date with SVN (this mirror might lag a little bit behind due to the sync), you can use the following approach.
Clone the mirror using:
git clone git://gitorious.org/webkit/webkit.git -o mirror
This will give you a local clone of WebKit with a remote named mirror pointing to this repository.
Then run
git svn init --trunk trunk --prefix svn/ http://svn.webkit.org/repository/webkit
in the above mentioned local clone. This will give you a remote named svn/trunk.
To speed up the initial sync, do a quick:
git update-ref refs/remotes/svn/trunk `git rev-parse refs/remotes/mirror/master`
Then, whenever you want to update your branch, run:
git fetch mirror; git cherry svn/trunk mirror/master | grep -q "^[+|-]" && git update-ref refs/remotes/svn/trunk `git rev-parse refs/remotes/mirror/master`; git svn rebase
Or create an alias for it in your .git/config file:
[alias]
update = "!sh -c 'git fetch mirror; git cherry svn/trunk mirror/master | grep -q \"^[+|-]\" && git update-ref refs/remotes/svn/trunk `git rev-parse refs/remotes/mirror/master`; git svn rebase'"
and just run:
git update

