29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9. Click OK to add the remembered tags to the selected repository location or<br />

project.<br />

15.7.3 Merging branches<br />

Merging two branches involves identifying changes that have been made<br />

between two points in the new branch and merging them into a workspace that<br />

contains the HEAD branch.<br />

Note: It is important to realize that the destination of the merge is always the<br />

project in your workspace. After the merge has completed, you should first test<br />

the changes locally and only then commit them to the new branch.<br />

The following is a scenario for working with multiple branches. It assumes that a<br />

new branch was created to add maintenance fixes. Once the maintenance is<br />

complete, the new branch is merged back into the HEAD branch.<br />

Table 15-1 Working with multiple branches<br />

Developer 1 (maintenance developer) Developer 2<br />

Checks out the project from the HEAD<br />

branch<br />

► Defines a branch tag (BeginMaint)<br />

► Tags project in workspace as new<br />

branch<br />

A new version called Root_BeginMaint is<br />

also created<br />

Adds & changes files in the BeginMaint<br />

branch<br />

Commits changes to the BeginMaint<br />

branch<br />

Loads the HEAD branch into the<br />

workspace<br />

► Select the project in the Web<br />

perspective.<br />

► Select Replace with -> Another<br />

Branch or Version from the context<br />

menu.<br />

► Select the HEAD branch.<br />

Checks out the project from the HEAD<br />

branch<br />

Adds and changes files in the HEAD<br />

branch<br />

Commits changes to the HEAD branch<br />

Chapter 15. Development in a team environment 541

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!