# Migration problems from SVN

3 messages from 2009-01-06 to 2009-01-06. Participants: Øyvind Harboe, Thomas Rast.
Thread: https://gitlist.dev/t/17020

## Øyvind Harboe, 2009-01-06 12:09

Subject: Migration problems from SVN
Message-ID: <c09652430901060409p23d2737ck6e41b3f8f1eaf01@mail.gmail.com>
URL: https://gitlist.dev/e/c09652430901060409p23d2737ck6e41b3f8f1eaf01%40mail.gmail.com

```
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, 2009-01-06 12:39

Subject: Re: Migration problems from SVN
Message-ID: <200901061339.49843.trast@student.ethz.ch>
URL: https://gitlist.dev/e/200901061339.49843.trast%40student.ethz.ch
In-Reply-To: <c09652430901060409p23d2737ck6e41b3f8f1eaf01@mail.gmail.com>

```
Ø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, 2009-01-06 12:44

Subject: Re: Migration problems from SVN
Message-ID: <c09652430901060444w2aff527fmb0855aaa707f84fa@mail.gmail.com>
URL: https://gitlist.dev/e/c09652430901060444w2aff527fmb0855aaa707f84fa%40mail.gmail.com
In-Reply-To: <200901061339.49843.trast@student.ethz.ch>

```
On Tue, Jan 6, 2009 at 1:39 PM, Thomas Rast <trast@student.ethz.ch> wrote:
> Ø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

```
