![]() ![]() The description “pre-merged by Git” refers to both the Git conflict markers, and the fact that the changes in the non-conflicting lines have already been merged in the working tree version. in the right half: the file’s contents from the feature branch (as always).in the left half: the file as it is in the working tree (i.e., in your file system, with Git conflict markers). ![]() “Use the working tree version of conflicting files (pre-merged by Git)” The right half of the compare editor always shows the file’s contents from the feature branch. Or by selecting “Merge Tool” from the file’s context menu in the Project Explorer:Īn important aspect to understanding the three merge modes is that their descriptions refer to what will be displayed in the left half of the resulting compare editor. The merge tool can either be started by double-clicking the conflicting file in the “Git Staging” view ![]() Now let’s inspect what the three different merge modes will show us for this simple scenario. Note that the non-conflicting edits (lines 2 and 4) have already been merged in this file. As expected, the text file contains the usual Git conflict markers after the merge: In the master branch, the following edits are performed:Īnd here are the edits from the feature branch:Īs you can see, whereas lines 2 and 4 have been edited in just one of the branches, line 6 was changed in both of them, leading to a conflict when performing a merge:Ī Linux shell script that automates this process is given at the end of this post. This file will be edited in the master and feature branch as indicated by its original lines. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |