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 the illustration publish-conflicts.png
Here's what to do when this happens: