
Depending on your version control system, conflicts may arise in different situations. When you work in a team, you may come across a situation when somebody commits changes to a file you are currently working on.

If these changes do not overlap (that is, changes were made to different lines of code), the conflicting files are merged automatically. However, if the same lines were affected, your version control system cannot randomly pick one side over the other, and asks you to resolve the conflict.Ĭonflicts may also arise when merging, rebasing or cherry-picking branches.
#Sublime merge resolve conflict update#
When you try to edit a file that has a newer version on the server, P圜harm informs you about that, showing a message popup in the editor: In this case, you should update your local version before changing the file, or merge changes later. If you attempt to commit a file that has a newer repository version, the commit fails, and an error is displayed in the bottom right corner telling you that the file you are trying to commit is out of date. The Integrated Merge Tool allows you to resolve any merge conflicts directly in Sublime Merge, rather than having to open up your editor of choice. The failed commit behavior is regulated by the Create changelist on failed commit list in the Version Control | Confirmation page of the Settings / Preferences dialog. Live Diff 3 Just like in the best diff tools available on the market, you can type, cut, copy, paste and delete directly in diff view. If you synchronize a file that already has local changes with a newer repository version committed by somebody else, a conflict occurs. The conflicting file gets the Merged with conflicts status. Integration with external tools like sublime text to allow opening the current merged view into said external tool, from which you can find the line you need, then switch back to sublime merge? This would essentially just be a shortcut button to solving this problem the way I have been, so I'm not sure it'd be that helpful.The file remains in the same changelist in the Local Changes view, but its name is highlighted in red. Depending on how the UI of the find tool is implemented, it also might make sense to have a selector input of some kind to allow a user to choose which context to search. Another option would be to just search in all three of them, although that might give irrelevant results. It could just look in the context of the center "merged" text, or it could search in the context of whatever pane was selected at the time the find tool was opened. There is the question of which context to "find" the text inside of, since during conflict resolution you actually have three different views. We should be able to type Ctrl/Cmd+F (or something else, but I would expect that one personally), which should pull up a find tool, allowing you to search for matching text, as you would in sublime text for example. Being able to do this would greatly simplify the resolution of complex conflicts when git isn't able to correctly identify where changes belong.

I was able to solve this by using another editor to find the line I needed to move it to, but I was not able to find/search for it from within sublime merge. Because my change moved the contents around quite a bit (in particular, breaking up lots of nested structures), the locations where git was suggesting the changes from the other branch belonged were not relevant, and I needed to move them to entirely different places within the file. During a particularly complex refactor, I did a rewrite on a ~1k line SCSS file, which had changes from another branch.
