Senior LevelGit & GitHub
How do you configure custom 3-way merge tools in .gitconfig?
❓ Interview Prompt: Explain git mergetool and git difftool configuration, binding custom 3-way visual editors (VS Code, KDiff3, Beyond Compare), and placeholders.
Configuring mergetool bindings in .gitconfig defines custom 3-way merge execution commands (%BASE, %LOCAL, %REMOTE, %MERGED) for visual conflict resolution in VS Code or KDiff3.
Code Implementation Example
ini
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait --merge $LOCAL $REMOTE $BASE $MERGED💡Configuring VS Code as custom 3-way visual merge tool in .gitconfig.
🎯 Interview Key Takeaway
Configure mergetool in .gitconfig using $LOCAL, $REMOTE, $BASE, and $MERGED placeholders for visual 3-way conflict resolution.
#git mergetool#Visual Merge#VS Code#Senior
Back to all Git & GitHub Questions→