So I'm trying to set up GitHub for the first time ever and I want Sublime Text to be my core editor, how exactly do I do that? Sorry if this is a noob question, I am a noob :/
The command to do this is git config --global core. editor "nano" . You can change the highlighted section with your editor of choice!
Sublime Text includes a command-line helper called subl . Using the command-line helper, you can open files and folders and perform other actions from the command line. Before using subl , make sure it is on your PATH . To put subl on your PATH , you may need to add directories to PATH or use symbolic links.
As this ranked highly when I was searching Google for Mac instructions, here is a combination of solutions I found.
First I set up a command line utility matching "subl" to Sublime Text from any terminal instance with this terminal command.
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
Then I do a similar git config command to the Windows solution above, but with a -w parameter at the end.
git config --global core.editor "subl -w"
Enter this command in a prompt:
git config --global core.editor "C:/Program Files/Sublime Text 2/sublime_text.exe"
It will then pop up when prompted for a commit message, or any other edition task, but if it was already open it won't work since it uses the same instance. Don't know how to workaround this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With