Friday, August 19, 2011

Git svn switch on windows

This is apparently something relatively obscure, since noone is actually writing about this. Are you people not using git as the only svn client? Anyhow, there are sometimes reasons to move stuff in svn repo, which causes horrible things to happen in git:
HTTP Path Not Found: PROPFIND request failed on '/repos/...': '/repos/.. path not found at C:\Program Files\Git/libexec/git-core/git-svn line 4441
This solution seems to be working fine on unix. There is a slight difference on windows of course (remember to escape the slashes):

git filter-branch --msg-filter "sed \"s/old_path/new_path/g\""