Commit changes into a new revision.
bzr commit [SELECTED...]
An explanatory message needs to be given for each commit. This is often done by using the –message option (getting the message from the command line) or by using the –file option (getting the message from a file). If neither of these options is given, an editor is opened for the user to enter the message. To see the changed files in the boilerplate text loaded into the editor, use the –show-diff option.
By default, the entire tree is committed and the person doing the commit is assumed to be the author. These defaults can be overridden as explained below.
If selected files are specified, only changes to those files are committed. If a directory is specified then the directory and everything within it is committed.
When excludes are given, they take precedence over selected files. For example, to commit only changes within foo, but not changes within foo/bar:
bzr commit foo -x foo/bar
A selective commit after a merge is not yet supported.
If the author of the change is not the same person as the committer, you can specify the author’s name using the –author option. The name should be in the same format as a committer-id, e.g. “John Doe <firstname.lastname@example.org>”. If there is more than one author of the change you can specify the option multiple times, once for each author.
A common mistake is to forget to add a new file or directory before running the commit command. The –strict option checks for unknown files and aborts the commit if any are found. More advanced pre-commit checks can be implemented by defining hooks. See bzr help hooks for details.
|Things to note:||
If you accidentially commit the wrong changes or make a spelling mistake in the commit message say, you can use the uncommit command to undo it. See bzr help uncommit for details.
Hooks can also be configured to run after a commit. This allows you to trigger updates to external systems like bug trackers. The –fixes option can be used to record the association between a revision and one or more bugs. See bzr help bugs for details.