External Sync / How to... / Resolving conflicts / Simultaneous Modification of a Template / Identical changes

Simultaneous changes to a template, identical changes

Table of contents

This scenario demonstrates the approach to a situation where multiple developers working on a template at the same time leads to identical changes being made to the local working versions of the template.

When identical changes are made to the same file, no conflict occurs when transferring the project content to the Git repository as text files with identical content are seen as being identical, regardless of the editor, time of editing, or other metadata.

Initial situation

The FirstSpirit project includes a page template page_text, whose presentation channel definition “HTML” contains the following text:

Line 1
Line 2
Line 3
Line 4
Line 5

The version of the page template is the same in both developers’ project instances.

How the conflict occurs

Developer A

  1. Modifying a FirstSpirit element
    Developer A changes the content of the presentation channel in the page template page_text:
    Line 1
    Line 2
    Line 3 modified
    Line 4
    Line 5
  2. Exporting changes into the file system
    Developer A uses fs-cli to export the current version of the project into the local file system (Git repository)
    fs-cli -p DevProject -sd "D:\Git\DevProject" export templatestore
  3. Transferring changes to the Git repository
    Developer A transfers the changes to the Git repository
    git commit -a -m "changed page_text"
    git push

Developer B

  1. Modifying a FirstSpirit element
    Developer B changes the content of the presentation channel at same point in the text that Developer A changed, and adds the same content as Developer A:
    Line 1
    Line 2
    Line 3 modified
    Line 4
    Line 5
  2. Exporting changes into the file system
    Developer B uses fs-cli to export the current version of the project into the local file system
    fs-cli -p DevProject -sd "D:\Git\DevProject" export templatestore
  3. Transferring changes to the Git repository
    Developer B transfers the changes to the Git repository
    git commit -a -m "export page_text"
    git push

Conflict resolution

The push of changes made by Developer B does not lead to a conflict as this change to the page template is identical to the change previously checked into the repository by Developer A. For Git, this means that both files are identical.

Next steps

Neither Developer A nor Developer B has to take further action at this point. Both developers can now continue with distributed development as normal.

The page template page_text with the identical versions of the presentation channel definition is now in both Developer A’s local project and Developer B’s local project

Line 1
Line 2
Line 3 modified
Line 4
Line 5

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.5 | Data privacy