Git merge conflicts

Performance test projects contain certain metafiles and test assets in binary form. When you work in a collaborative test creation environment, you might encounter Git merge conflicts while you commit test assets to the remote Git repository.

When you view a project in the File Explorer, the folder structure is displayed as follows:

test_assets_file_structre

The metafiles such as .project, .classpath, assets.xml, and the test assets must be committed to the remote Git repository for seamless collaboration. Due to the specialized format of information in the metafiles and test assets being binary files, the Git merges cannot happen automatically. You must resolve the resulting merge conflicts manually, if any.

Best practices to minimize the merge conflicts

You must adhere to the following best practices to minimize the merge conflicts when you commit test assets to the remote Git repository:

  • Refrain from working on the same test assets to the extent, if possible.

  • Ensure that the team members coordinate and work closely with other members while making changes on the same test assets. Thereby, if there are any merge conflicts on binary files, those errors can be identified and addressed at the earliest.

  • Keep the local Git repository up-to-date with the remote upstream branch by pulling in changes periodically. The local Git branch must be made up-to-date with the master branch by re-basing frequently.

  • Use the descriptive messages for your commits, so that other members can refer to those messages to resolve merge conflicts efficiently.