Joachim Breitner
Joachim Breitner

Reputation: 25762

Remove a change from an ealier bazaar commit

I am working on a feature branch in bazaar. For the purposes of building the project locally, I modified a file locally (build), although I do not want this change to be included in my commits. Most of the time I remember to exclude that file from bzr commit, or aborted when seeing the summary, but a few commits ago I did overlook it and now the local change has entered the history.

Before submitting my branch, I’d like to clean this up. Is there a way to remove that change from the earlier commit without reverting to the state before and re-doing all commits? Naturally, this does involve rewriting history.

For clarification: In git, I would use git rebase -i and just edit the commit.

Upvotes: 4

Views: 380

Answers (1)

dOxxx
dOxxx

Reputation: 1539

The bzr-rewrite plugin provides the same functionality as git rebase. It should be bundled with the installers for Windows and Mac OS X. For Linux, depending on your distribution, it may be a separate package.

EDIT: The bzr-rewrite plugin doesn't provide an interactive mode, so it wouldn't be of help in this situation.

Upvotes: 2

Related Questions