# Working with Branch

## Activate Branch

Welcome to the OpenBrIM branch system. With this branch system, any object within the library becomes an object you can work on, allowing you to see the developments you make in your own workspace.

First of all, if the branch system is desired to be used actively, dlibv = 1 should be used. Because using the final version of the object, which is used by overriding, will create a safer working environment for the user.

To get started, the user should navigate to their own folder under the 'author' section and click on the 'branch' button here.

![image-20240113-140211.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240113-140211.png?api=v2)

![Untitled Diagram.drawio-20240113-141031.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio-20240113-141031.png?api=v2)

Within the opened UI, first create a new branch or select the branch you want to work on.

![Untitled Diagram.drawio (17)-20240116-105940.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(17\)-20240116-105940.png?api=v2)

![Untitled Diagram.drawio (2)-20240113-141634.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(2\)-20240113-141634.png?api=v2)

After adding a branch, the library object to be overridden and the user's object with which it should be overridden should be introduced here. There are 2 methods for this. The first one is 'Add Library and Override Object...'. This button allows you to add the library object to the branch and your existing object. The second one is 'Pull Library Objects...'. This button retrieves the final state of the object from the library and saves it to the user's side by renaming it. This method is quite useful for getting the latest version of the library objects to work on.

![Untitled Diagram.drawio (18)-20240116-110320.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(18\)-20240116-110320.png?api=v2)

Now, click on the 'Pull Library Objects...' button and select the library objects you want to work on in the opened UI. In this example, the OBPBase\_SteelIGirderCodeCheck, OBPTemplate\_SteelIGirderCodeCheck, and OBPDR\_SteelGirderCodeCheck objects are selected, and the 'Pull' button is clicked.

![Untitled Diagram.drawio (4)-20240113-145551.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(4\)-20240113-145551.png?api=v2)

After the process is completed, you can see the library objects and override objects within the branch. If you want to remove from the branch or delete the override object, you can proceed by clicking on 'X'. Additionally, you can click on the button on the right side of the row to examine the difference between the two objects.

![Untitled Diagram.drawio (19)-20240116-110617.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(19\)-20240116-110617.png?api=v2)

![image-20240113-150041.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240113-150041.png?api=v2)

![image-20240116-110641.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240116-110641.png?api=v2)

Finally, by clicking the 'Copy' button, you can copy the link of the active branch to allow another user checkout or by clicking the 'Activate Branch' button, the selected branch becomes active. You need to share the link with the other user. To continue with this example, click on the 'Activate Branch' button.

![Untitled Diagram.drawio (20)-20240116-110944.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(20\)-20240116-110944.png?api=v2)

{% hint style="info" %}
Let's make changes to the objects in the active branch to observe their impact on the project.
{% endhint %}

![image-20240113-151348.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240113-151348.png?api=v2)

First, navigate to the OverrideCodeCheck\_OBPBase\_SteelIGirderCodeCheck object and link the document name to an input parameter.

![Untitled Diagram.drawio (7)-20240113-151953.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(7\)-20240113-151953.png?api=v2)

Secondly, go to the OverrideCodeCheck\_OBPBase\_SteelIGirderCodeCheck object and add a DocSection with the Title 'Section Properties Branch Test'.

![Untitled Diagram.drawio (8)-20240113-152546.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(8\)-20240113-152546.png?api=v2)

Finally, go to the OverrideCodeCheck\_OBPTemplate\_SteelIGirderCodeCheck object and change the category and description of the 'UserPrefA6' parameter from A6 to C6.

![Untitled Diagram.drawio (9)-20240113-152649.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(9\)-20240113-152649.png?api=v2)

Now let's go to a project where we use code check and examine the results of the changes made.

The newly added document name parameter appears as an input in the spreadsheet. The names given here are visible within the report.

![Untitled Diagram.drawio (10)-20240113-153043.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(10\)-20240113-153043.png?api=v2)

![image-20240113-153230.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240113-153230.png?api=v2)

Here, in the spreadsheet, it is visible that it displays the category and name as C6 instead of A6.

![Untitled Diagram.drawio (11)-20240113-153503.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(11\)-20240113-153503.png?api=v2)

And finally, the document shows the 'Section Properties Branch Test' DocSection.

![Untitled Diagram.drawio (12)-20240113-153711.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(12\)-20240113-153711.png?api=v2)

***

## Share Branch

To share the branch with another user, click on the 'Copy' button and copy the provided link.

![Untitled Diagram.drawio (21)-20240116-111937.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(21\)-20240116-111937.png?api=v2)

The other user can add the branch to their workspace by clicking on the 'Checkout Branch' button in the opened UI and pasting the copied link.

![Untitled Diagram.drawio (22)-20240116-112509.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(22\)-20240116-112509.png?api=v2)

The branch has now been added to the other user's workspace. They can test the objects and examine the differences between the objects.

![image-20240116-112558.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240116-112558.png?api=v2)

***

## Use Branch at App

Finally, user can also access the branch settings from the app. Click on the 'Objects' button on the right, and in the opened UI, click on the 'branch' button.

![Untitled Diagram.drawio (23)-20240116-113216.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/Untitled%20Diagram.drawio%20\(23\)-20240116-113216.png?api=v2)

Here, user can change active branch, add or remove objects from user branch, and checkout branches shared by other users.

![image-20240116-113341.png](https://openbrim.atlassian.net/wiki/download/attachments/2341732353/image-20240116-113341.png?api=v2)
