Changes between Version 11 and Version 12 of BazaarWorkflow
- Timestamp:
- 2009-08-17T19:27:03Z (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BazaarWorkflow
v11 v12 51 51 Let us say your branch diverged from the mainline (i.e. somebody pushed to the main repository since you branched off). This is perfectly normal. You can work on your branch independently of the mainline. However, from time to time you might want to actually propagate your great new changes to the mainline. We do it by merging. 52 52 53 With merging, the order of arguments is significant. You must always ''merge your branch into the mainline'', neverthe other way around! How can you do this? With bazaar you can only merge to a local repository (you need to chdir into it), you cannot merge to a remote repository.53 With merging, the order of arguments is significant. In this case we want to ''merge your branch into the mainline'', not the other way around! How can you do this? With bazaar you can only merge to a local repository (you need to chdir into it), you cannot merge to a remote repository. 54 54 55 Therefore we have to resort to a little trick. Suppose you r branch {{{my_branch}}} diverged from the mainline. We thuscreate a new branch {{{head_clone}}} which will be a clone of the mainline:55 Therefore we have to resort to a little trick. Suppose you have a branch {{{my_branch}}}. We create a new branch {{{head_clone}}} which will be a clone of the mainline: 56 56 57 57 {{{ … … 73 73 }}} 74 74 75 Remember that it is not necessary to merge every commit you make into the mainline right away. It can be better to merge more changes at a time. 76 75 77 === Keeping Your Branch Up to Date === 76 78 … … 81 83 my_branch$ bzr commit -m "Merge latest mainline changes." 82 84 }}} 85 86 Note that it is not necessary to merge all new mainline changes at once, you can do it less often, preventing unnecessary merges. Especially note that it makes no sense merging the mainline if the only new changeset is the changeset that merges the latest changes from your branch. 87 88 === Keeping a Clone Around === 89 90 It is advisable to keep a clone (such as the {{{head_clone}}} repository mentioned above) around. You can keep it up to date by pulling from the main repository: 91 92 {{{ 93 head_clone$ bzr pull 94 }}} 95 96 It is good for two things: 97 98 * compiling and testing the latest and greatest changes in the mainline (without having to merge them) 99 * merging into the mainline 83 100 84 101 == What if I pull from mainline to my feature branch? ==