Purging parts of a branch's history?

John Arbash Meinel john at arbash-meinel.com
Thu Jul 31 16:36:52 BST 2008

Hash: SHA1

Staffan Gimåker wrote:
| Hi!
| Is it possible to remove parts of the history from a bzr branch? I
came up
| empty-handed after googling and skimming through the contents of the User
| guide.
| I run and open-source project which was converted from SVN that
contains a lot
| of bogus commits early in the history. They have no value now and only
| the history and take up storage space, thus I'd like they removed from
| history if it is possible.
| So, is this possible, and if so, how would I go about doing it? Maybe
this is
| somehow possible with bzr-rebase?
| Staffan
| PS. Thanks for producing a great tool! I recently converted from SVN
and have
| been very happy thus far - discovering little neat things like "bzr
| is especially rewarding :)

Yes, you generally would have to use 'bzr-rebase' to prune bits of history.

I don't have an exact recipe for you, but something like:

bzr init new_branch
cd new_branch
bzr pull -r XX ../old_branch (pull whatever you think is *good* to keep)
bzr rebase -r YY..ZZ ../old_branch

Or something along those lines.

I would question the real need to do the pruning. I won't say you
shouldn't, just that the effort to prune is probably not worth as much
as putting your effort towards improving the project :)

Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the bazaar mailing list