threads / discuss / 17020

Migration problems from SVN

Subject: Migration problems from SVN

## tl;dr

3 messages between Jan 6, 2009 and Jan 6, 2009.

replies: 2people: 2as markdown or json

Øyvind Harboe· Jan 6, 2009, 12:09 UTC · lore
Hi all,

I'm trying to migrate from svn to git, but has run into a snag for which I haven't found any good solutions on the web:

If I early on and accidentally commit a *large* binary object, how do I get rid of it from .git again?

svn copes with this reasonably well as the binary object will no longer be downloaded if it is deleted. Also when converting old SVN repositories, such objects needs to be pruned. Somewhat related I also need to enumerate the offending large binary objects that I should get rid of.

It is unpractical to live by the rule that no big objects should ever be committed accidentally given the number of people involved and the walks of life they come from.... So there really needs to be some way to deal with this once the damage has been done.

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
Thomas Rast· Jan 6, 2009, 12:39 UTC · re: Øyvind Harboe · lore

Re: Migration problems from SVN

Øyvind Harboe wrote:
> If I early on and accidentally commit a *large* binary object, how do I get rid
> of it from .git again?
git-filter-branch can do that.  See the top of the EXAMPLES section in
  http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html

This requires a rewrite of all history affected; make sure you understand the implications if you have already published it. See the DISCUSSION in the same manpage.

Also note that due to the distributed nature, you cannot force such changed history upon anyone; i.e., you cannot remove the objects from anyone else's repository. You can only ask them to accept your new history and forget that the old one was ever there.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Øyvind Harboe· Jan 6, 2009, 12:44 UTC · re: Thomas Rast · lore

Re: Migration problems from SVN

On Tue, Jan 6, 2009 at 1:39 PM, Thomas Rast <trast@student.ethz.ch> wrote:
Show 5 quoted lines
> Øyvind Harboe wrote:
>> If I early on and accidentally commit a *large* binary object, how do I get rid
>> of it from .git again?
>
> git-filter-branch can do that.  See the top of the EXAMPLES section in

Ah! Thanks! I will study this. Thanks for your patience with a beginner, I guess I should have spotted this one. There is a lot to read and git is refreshingly different and there is a lot of things to catch up on.

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer

← back to recent threads