Skip to content
fabn edited this page Aug 30, 2012 · 2 revisions

This repository was created with these commands

# first copy creation
git svn clone --preserve-empty-dirs --no-minimize-url http://svn.resourcespace.org/svn/resourcespace
git remote add origin <github-url>
git push --all

Manage the mirror from other git clones

To fetch the latest svn updates from another git repository if the original was deleted

# clone from the origin
git clone <remote-url> && cd <git-folder>
# other copies initialization
git svn init --no-minimize-url http://svn.resourcespace.org/svn/resourcespace
# only if initial clone was done with --preserve-empty-dirs, useful since svn keep track of empty dirs while git doesn't
# this is extremely important, otherwise the SHA1 will changes during history rebuilding
git config svn-remote.svn.preserve-empty-dirs true
git config svn-remote.svn.placeholder-filename .gitignore
# fetch svn revisions from Subversion repositories
git svn fetch

Fetch new changes and push them to the git mirror

# bring new svn revisions in git
git svn rebase
# push changes to the public mirror
git push origin master

Merging from upstream

Since RS guys used mixed line endings and git usually normalize linefeed when storing objects this setting in the local copy can be useful

git config merge.renormalize true

in order to ignore line ending changes considered during git merges