Are squashed commits and discarded branches possible in bzr?
Jelmer Vernooij
jelmer at samba.org
Sun May 9 23:24:08 BST 2010
On Sun, 2010-05-09 at 15:18 -0700, Todd A. Jacobs wrote:
> I'm trying to understand Bazaar better, coming from a git background.
> One of the things I like about git is the ability to create temporary
> branches where I can make incremental commits while trying out an idea,
> and then later merge the changes into mainline with a squashed or edited
> commit, or simply purge a failed branch from the repository altogether.
> Technically, those commits hang around in the git reflog until purged,
> but they aren't cluttering up the actual view of history.
>
> So far, despite googling extensively and attempting to grok the manuals,
> I haven't figured out how to do either of these things in Bazaar. So,
> the first question is obviously "Can these things be done in Bazaar?" If
> so, how? If not, how do people handle these sorts of needs in a
> Bazaar-centric way?
>
> I don't really want an argument about the relative merits of squashed
> commits or of purging irrelevant history. That's my workflow, and I'm
> simply trying to find a way to use Bazaar that closely resembles my
> current workflow.
The easiest thing you can do is:
$ bzr merge ../feature-branch
$ bzr revert --forget-merges
$ bzr commit -m "New commit message for squashed commit"
Does that address your use case?
Cheers,
Jelmer
More information about the bazaar
mailing list