Eliminate the stress of merge conflicts and check if the changes you are making on your own branch conflict with any other branch, anytime, directly in your IDE.

Merge conflicts are now flagged in the following places:

  • Tracked branches with commits to pull that conflict with the changes on your local branch are highlighted with an exclamation mark and the count of conflicting files is shown beside the branch.
  • Their branches that conflict with your branch are also highlighted with exclamation marks, these appear beside the authors, branches and files as you expand each level.
  • Diff editors opened by selecting a file with conflicts from Tracked branches or Their branches will have their conflicting lines highlighted red in the right-hand gutter of the diff editor.
  • Text editors contain bright red indicators in the gutter highlighting conflicts with other branches, these work just as they did before but with some added improvements.

It’s worth noting the gutter indicators in diff and text editors update as you type to highlight conflicts with your working tree changes but, in Tracked branches and Their branches, conflicts with your local changes are only flagged once you stage (or commit) them.

Conflicts in Tracked branches

Tracked branches are the stack of upstream branches tracked by your local branch, you can read more about them in our last blog post. There are now 3 possible states for a tracked branch:

  •   You are up-to-date with the latest changes on the branch and there are no new commits to pull.
  •   You are behind the branch but the commits to pull will merge cleanly with your staged changes.
  • ❗You are behind the branch and the commits to pull will cause conflicts with your staged changes.

When there’s commits to pull from an upstream branch you can expand the branch to view the files, any files that contain conflicts will also be flagged with an exclamation mark.

VS Code JetBrains
Tracked branches in VSCode Tracked branches in JetBrains

Selecting a file with conflicts will open a diff editor comparing the file against your working tree version with conflicting lines highlighted red in the right-hand gutter of the diff editor.

Conflicts in Their branches

Their branches is a powerful view of all the work in progress in your repository, you can read more about it in our last blog post including how to use the view options to set the left and right of the diff performed by GitLive.

To show conflicts in Their branches we have added a new default left view option: Your working tree. It shows all the branches in the repository that are ahead of your local branch and compares the changes to your own to detect conflicting files.

VS Code JetBrains
Their branches in VSCode Their branches in JetBrains

We have also added the Only show conflicts view option which will filter Their branches to only the authors, branches and files that contain conflicts with your local changes.

VS Code JetBrains
Their branches view options in VSCode Their branches view options in JetBrains

Just like Tracked branches, selecting a file with conflicts will open a diff editor comparing the file against your working tree version with conflicting lines highlighted red in the right-hand gutter of the diff editor.

Conflicts in diff editors

Conflicts are shown in the diff editor when Your working tree left view option is selected. You can read more about the diff view options in a previous blog post.

With Your working tree selected, the right-hand side of the diff is rebased on-to the left and conflicting lines are highlighted in the right-hand gutter so you can easily compare their changes to your own.

VS Code JetBrains
Conflicts in diff editors in VSCode Conflicts in diff editors in JetBrains
Why is the right-hand side of the diff rebased?

This concept can be a little confusing at first so it’s worthy of an extended explanation.

With the left-hand side of the diff being your version of the file, if the right-hand side was simply their version of the file then the differences would also include any changes you have made. To avoid this additional ‘noise’, the right-hand version is modified accordingly - as if you had already merged the two versions of the file together and resolved any conflicts with their changes.

This way you only see the actual differences between your version and theirs, including the conflicts highlighted in the gutter. You can also select the Only show conflicts view option which will modify the right-hand version to remove non-conflicting changes.

VS Code JetBrains
Diff view options in VSCode Diff view options in JetBrains

Conflicts in text editors

Indicators in the gutter of the editor highlighting changes from other branches were introduced way back in GitLive 11 and enhanced in 15 and 16.1. This release improves the integration between the indicators and the upgraded Repository View.

Changes from tracked branches show the Tracked branches icon in the gutter instead of the author’s avatar so you can easily spot changes in your editor that you need to pull.

Another improvement in the gutter popup is clicking the branch link will open the branch directly in the Repository View where you can inspect the other changes made on the branch.

VS Code JetBrains
Text editor conflicts in VSCode Text editor conflicts in JetBrains
As this is a major version update make sure your whole team upgrades, all team members need to use the same major version of the plugin otherwise you may find some features do not work correctly.