Sublime Text 3: Using the OS X Command Line

The Problem
Sublime Text 3 includes a command line tool, subl. Unfortunately, this tool doesn't work right out of the box after you've installed the editor on OS X Yosemite.
My Solution
After installing Sublime Text 3, create a symbolic link using the following command:
Here,
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/sublis the location where the application is stored in your Applications directory./usr/local/binis the chosen path where you want the symbolic link to reside.
To set Sublime Text as the default editor for various commands that prompt for input, configure your EDITOR environment variable as follows:
The -w flag ensures that the subl command will not exit until the file is closed.
Additionally, you can set Sublime Text as your default Git editor with this command: