i have a git repository which is my development Repository. I need to upload all changes on a weekly base to an svn repository – but I don’t want to expose my git-commit-history. In other words: I explicit want to lose the history. All changes in the git repository for the given week need to be squashed to one single svn commit.
Example for one week:
Git:
commit 1 "fixed y"
commit 2 "added feature x"
commit 3 "foo"
commit 4 "fixed n"
SVN:
commit 1 "changes from this week"
Ideally it should be done by a small shell or python script which is started automatically via cron job.
I have the following variables:
LOCAL_PATH=/tmp/git-svn-bridge/
GIT_DIR=git_repo
SVN_DIR=svn_repo
GIT_REPO_URL=git://git@my_git_server
GIT_REPO_NAME=my_git_repo
GIT_REPO_BRANCH=master
SVN_REPO_URL=svn://my_svn_server
SVN_USER=FIXME
SVN_PASS=FIXME
Any ideas?
Thanks for reading!
Here’s the general idea – use
git archiveto export and thenrsync -a --deleteto update the svn working copy. Something along the lines of: