Hey you! Are you working through some issues but don’t have time for the therapist’s couch? When you sit down and start working with the merge tool in GitKraken, all your internal struggles will disappear. No hypnosis or guided imagery needed.
Because the fact of the matter is that conflicts are pretty common—in coding and in real life. And sometimes you need a referee, a parent or a therapist. Enter GitKraken’s merge conflict tool. It’s like having all of those three people in one.
Here’s the Deal
According to Jose Garcia, Developer at Axosoft, “When you try to merge files or branches together you’ll occasionally get conflicts,” which in the past would force you to get out of your Git client, open another app, etc. Essentially, you have to take a bunch of extra steps.
Well, not when you use GitKraken! “The GitKraken merge conflict tool lets the user combine code the way he or she wants,” explains Garcia.
“Most Git clients ask you if you want to install another app. GitKraken will ask you, but also provides a way to resolve the conflict right in the app.”
According to Garcia, “One of the main goals of GitKraken is to keep users in the app so they don’t have to leave it to do things they should be able to do in GitKraken.” He goes on to explain that in order to do this, redesigning the UI was paramount.
“We had to make a custom area,” he reports. “There are three small windows that show you three different versions of the same file; so if you scroll through one, you want the other two to do so as well,” he explains. “We added that synchronization functionality.”The merge conflict tool performs in-app.
The merge conflict tool performs in-app.
Using the Merge Conflict Tool
It’s pretty straightforward, really. When you have a merge conflict, simply click on the conflicted file. Instead of opening the regular diff view you’re familiar with, it will open a specialized view for helping you resolve merge conflicts without having to leave the app.
Most Git clients ask you if you want to install another app. GitKraken will ask you, but also provides a way to resolve the conflict right in the app.
– Jose Garcia, Axosoft GitKraken Developer
This view has three different sections:
- The two side-by-side sections on the top half show you the different versions of the file you are trying to merge.
- The third section on the bottom half shows the output.
To select which lines you want to take, you can click on any individual highlighted line to add it to the output. You can also use the checkbox next to each conflict section to add the entire chunk to your output.
You can also just decide to take an entire side with the “Take All” button. The arrow buttons help you quickly navigate between the different conflicts in the file.
When you are happy with your selections, click on “Save and Mark Resolved” to save your file and stage it.
Check out the GitKraken release notes for more details about the merge conflict tool; it’s just another step toward making GitKraken 100% standalone!