Skip to content

Instantly share code, notes, and snippets.

@andyshora
Created April 9, 2014 13:39
Show Gist options
  • Save andyshora/10271732 to your computer and use it in GitHub Desktop.
Save andyshora/10271732 to your computer and use it in GitHub Desktop.
Set Sublime Text 2 as the default Git merge tool to resolve conflicts
ln -s "/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
git config --global mergetool.sublime.cmd "sublime -w \$MERGED"
git config --global mergetool.sublime.trustExitCode false
git config --global merge.tool sublime
@kartsims
Copy link

First line is for Mac only, on Linux, the subl binary is available for the CLI by default

Fix please

line 3 : the command should be subl -w \$MERGED

Thanks for the snippet 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment