Purpose: | Perform a three-way merge. |
||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Usage: | bzr merge [LOCATION] |
||||||||||||||||||||||||||||||||||||||||||||||||||
Options: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The source of the merge can be specified either in the form of a branch, or in the form of a path to a file containing a merge directive generated with bzr send. If neither is specified, the default is the upstream branch or the branch most recently merged using –remember. When merging a branch, by default the tip will be merged. To pick a different revision, pass –revision. If you specify two values, the first will be used as BASE and the second one as OTHER. Merging individual revisions, or a subset of available revisions, like this is commonly referred to as “cherrypicking”. Revision numbers are always relative to the branch being merged. By default, bzr will try to merge in all new work from the other branch, automatically determining an appropriate base. If this fails, you may need to give an explicit base. Merge will do its best to combine the changes in two branches, but there are some kinds of problems only a human can fix. When it encounters those, it will mark a conflict. A conflict means that you need to fix something, before you should commit. Use bzr resolve when you have fixed a problem. See also bzr conflicts. If there is no default branch set, the first merge will set it. After that, you can omit the branch to use the default. To change the default, use –remember. The value will only be saved if the remote location can be accessed. The results of the merge are placed into the destination working directory, where they can be reviewed (with bzr diff), tested, and then committed to record the result of the merge. merge refuses to run if there are any uncommitted changes, unless –force is given. The –force option can also be used to create a merge revision which has more than two parents. If one would like to merge changes from the working tree of the other branch without merging any committed revisions, the –uncommitted option can be given. To select only some changes to merge, use “merge -i”, which will prompt you to apply each diff hunk and file change, similar to “shelve”. |
||||||||||||||||||||||||||||||||||||||||||||||||||
Examples: | To merge the latest revision from bzr.dev: bzr merge ../bzr.dev
To merge changes up to and including revision 82 from bzr.dev: bzr merge -r 82 ../bzr.dev
To merge the changes introduced by 82, without previous changes: bzr merge -r 81..82 ../bzr.dev
To apply a merge directive contained in /tmp/merge: bzr merge /tmp/merge
To create a merge revision with three parents from two branches feature1a and feature1b:
|
||||||||||||||||||||||||||||||||||||||||||||||||||
See also: |