title: Git opening Sublime in Windows
body: <p>I ran the following instructions and they "worked" perfectly. Actually they did exactly what they said on the box. The issue I have is that when I run a command like git commit I want it to use sublime as the message editor.</p>
  
  <blockquote>
    <p>Windows</p>
    
    <p>Find the directory where Sublime is located for you.  For many people,
    this is C:/Program\ Files/Sublime\ Text\ 2/sublime_text.exe.  To test
    this, run ls C:/Program\ Files/Sublime\ Text\ 2 within Git Bash.  You
    should see sublime_text.exe listed.  If you get the error No such file
    or directory, Sublime is located somewhere else for you and you'll
    need to find it.  For example, it might be under C:/Program\ Files\
    (x86)`.</p>
    
    <p>Run the following command in Git Bash: echo 'alias subl="C:/Program\
    Files/Sublime\ Text\ 2/sublime_text.exe"' >> ~/.bashrc If subl was in
    a different directory for you in step 1, use that directory.</p>
    
    <p>Close and re-open Git Bash.  Typing subl in Git Bash should now open
    Sublime.</p>
  </blockquote>
  
  <p>I know that I should run the command</p>
  
  <pre><code>git config --global core.editor "subl"
  </code></pre>
  
  <p>But that then runs the error message below when I try to use git commit</p>
  
  <blockquote>
    <p>error: cannot spawn subl: No such file or directory error: unable to
    start editor 'subl' Please supply the message using either -m or -F
    option.</p>
  </blockquote>
  
  <p>Can anyone shed any light on what I should be doing?</p>