Resolve conflicts

If more than one developer are making changes to the same object and committing the object at the same time, conflicts will occur when synchronizing the object. When conflicts are detected, the object in the library tree will be marked by a "!" sign () and you will be prompted in the output view and will have to resolve the conflict manually before you can commit the object.

The following steps walk you through how to resolve the conflicts and merge the changes (Suppose developer A and B make changes to the same PowerBuilder object at the same time):

Step 1: Developer A commits the object to the source control server successfully.

Step 2: When developer B tries to commit the object, he receives a message requiring him to update the object first, so developer B performs Git Pull, then the object in the library tree will be marked by a "!" sign () which means there is a conflict, and the changes made by Developer B, the original code, and the changes made by Developer A will be listed together in the object's source code.

Step 3: Developer B right-clicks the object and selects Edit Conflicts; the object's source code will be displayed in TortoiseGit. Developer B looks into the source code and decides which changes to keep (the changes made by Developer B, the original code, or the changes made by Developer A). He manually removes the unwanted changes from the object's source code.

In order for the Edit Conflicts option to work, developers will need to specify the executable program of TortoiseGit in the Properties of Workspace/Solution dialog box first. See Tools for Show Log\Edit Conflicts for details.

Note

After you merge the changes, make sure to refresh and then compile the object in PowerBuilder, otherwise, the object may be missing or fail to open in the PowerBuilder IDE, or may cause the PowerBuilder IDE to crash.

Step 4: Developer B performs Git Resolve for the object to refresh the object status (clears the conflict sign) and commit the object to the server.