tags:

views:

110

answers:

2

hello, we have a fairly huge svn repository that i access using git. so far everything was working fine. now someone accidentally added some huge chunks of binary data to the svn repository. (hundreds of MB!) of course git also sucked in those chunks (using git-svn).

Is there a way to selectively remove some files from git without disturbing the synchronization with the svn repository?

A: 

You could try using git svn's 'ignore path' to specify the name of the binaries that were added. You'd probably need to do an 'svn reset' to go back to the point in time in which they were added, and then filter the paths to remove these files.

AlBlue
NB this would have the effect of changing the history from the point of the SVN commit onwards, so other Git users would need to rebase off it after you've done this.
AlBlue
unfortunately this is not an option since i cannot change the svn history anymore
oliver
+1  A: 

I believe rewriting git history using git filter-branch --tree-filter "rm -rf unwanted_dir" wouldn't disturb the synchronization—as far as I can tell, git-svn only depends on the git-svn-ids in the commit messages, which should stay the same. I haven't tried it, though. ☺

legoscia
sounds a little scary...but still reasonable. i will give it a try with a cloned repo:)thanks for the hint
oliver