Sublime Merge includes a command line tool, smerge
, to work with git, subversion, mercurial projects on the command line. This can be used to open projects in Sublime Merge using the command line.
- Sublime Merge installed in your system within
Applications
folder
In order to launch sublime from command line you only need to create a symlink /usr/local/bin/smerge
point to sublime merge app, to do so run the following in the command line.
ln -sv "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" /usr/local/bin/smerge
You can use any name whlie creating the symlink
like /usr/local/bin/sm
type in command line
smerge myGitProject
it should open the project using Sublime Merge
NOTE: To accomplish this you must:
have created a directory where you actually place binaries /usr/local/bin
if not make it before creating a symlink
:
mkdir -p /usr/local/bin
have /usr/local/bin
in your PATH environment variable, if not add by running the following command:
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
then reload the shell:
source ~/.bash_profile
test again.
Further info read from Sublime Merge Docs
solution for Zed zed-industries/zed#8665 (comment)