Resolve Conflicts

Sometimes when you publish changes, you might run into conflicts. Conflicts usually occur when you and your teammate make changes that overlap or conflict with each other. For example, both of you might have changed the same line in a file in different ways, or one of you might have deleted a file while the other modified it. In such cases, VB Studio cannot tell which change should take precedence—it's up to you or your teammate to make that decision and resolve the conflict.

Before you begin resolving conflicts, familiarize yourself with some concepts underlying source control in VB Studio. At the heart of your work in VB Studio is Git, which stores source files in a repository and manages all your changes through branches.

When you first update pages, you're starting with a set of files as they exist in a Git repository's default branch (main), which is the remote repository containing the source from which your pages are built. As you begin to make changes, your work is saved to a local branch, in a local repository—but these changes are not visible to others. To make them available to others, you publish your changes, which through a series of Git operations, such as commit, fetch, and merge, pushes your changes from your local branch to the main branch in the remote repository.

Now let's say you've changed lines 2 and 3 in Readme.md but are yet to publish those changes. If someone else modified the same or subset of these lines in Readme.md and published those updates, then when you publish your changes, you'll be warned of conflicts between the file's remote version and your local version:
Description of publish-conflicts.png follows
Description of the illustration publish-conflicts.png

Here's what to do when this happens:

  1. Click Show Conflicts to view the files identified as containing conflicts.

    Note that at this point, VB Studio switches to Advanced mode, which provides extensive Git options that you can explore further if you want, but it is not required. The actions described in this section are likely sufficient to help you resolve the conflicts and proceed with publishing.

  2. Right-click the file listed under Conflicts in the Git Panel and take action.

    The options shown depend on the type of conflict in the file. Here's an example of what you see when people make different changes to the same line of the same file (Readme.md):
    Description of gitpanel-conflict-express.png follows
    Description of the illustration gitpanel-conflict-express.png

    Action Steps
    Open in conflict editor Select this option to open the file in the conflict editor; you can also just click the file to open it in the conflict editor. The conflict editor has controls to help you navigate between conflicts and provides options to resolve them. See Use the Conflict Editor to Resolve Conflicts.
    Open in default editor

    Select this option to open the file in the default editor, which is the designated file editor in VB Studio (for example, the Page Designer for an .HTML file or the JavaScript editor for a .JS file). This option is useful for non-text files (such as Excel worksheets and schema files) or other artifacts that aren't supported in the conflict editor. You can then open these files in the default editor and manually resolve the conflicts.

    Resolve Select this option to quickly resolve the file's conflicts, instead of going through each conflict in the conflict editor. This option is useful when the file has only a few conflicts that you can easily resolve by selecting either your version or the other version. See Use the Context Menu to Resolve Conflicts.

    Note:

    Resolve is not an option for non-text files. If you run into conflicts for binary files (say, an image), you'll need to delete the file from the Git repo, then add it again after you've resolved all other conflicts and committed them to the remote repo.
    Delete Select this option to delete the file from the Git repo.
  3. If you have multiple files with conflicts, right-click each file in the Git Panel and take action.
  4. Once you've resolved all the conflicts, click Publish in the header. If the conflicts are all resolved, click Continue to complete publishing your changes.