How to Change the Default Editor for Git

git, terminal

Solution

Just answered my own question with the help of the above comments... to switch to TextWrangler as the default for Git, you must open TextWrangler, click on TextWrangler in the tool bar and select "install command line tools" from the drop down. Then go into command line and type:

git config --global core.editor "edit -w"

Edit is the command that is understood in the command line which means to open a textWrangler file.

Problem

I just started using git about a month ago. It was set up for me using TextMate as my default editor for commits. However, I'd like to switch the default to TextWrangler which I already have installed. I looked around online and found a line of code to type into the terminal to do this. So I opened the terminal and typed: ``` cd Desktop cd "projectName" git config --global core.editor TextWrangler git status git add. git commit //then the error comes up ``` The error says: error: cannot run TextWrangler: No such file or directory error: There was a problem with the editor 'TextWrangler'. Please supply the message using either -m or -F option. I don't know what this means or what I am doing wrong. I am sure its an obvious mistake, but can anyone explain how to fix this?

Original source

Related problems