title: How to use Visual Studio Code as default editor for git?
body: <p>When using git at the command line, I am wondering if it is possible to use Visual Studio Code as the default editor, i.e. when creating commit comments and looking at a diff of a file from the command line.</p>
  <p>I understand that it won't be possible to use it for doing merges (at least at the minute) but does anyone know if it is possible to use it for looking at diff's, and if so, what command line options would be required in the .gitconfig file to make this happen?</p>
  <p><strong>UPDATE 1:</strong></p>
  <p>I have tried an approach similar to what I have done for <a href="https://stackoverflow.com/questions/10564/how-can-i-set-up-an-editor-to-work-with-git-on-windows">Notepad++ in the past</a>, i.e.</p>
  <pre><code>#!/bin/sh
  
  &quot;c:/Program Files (x86)/Notepad++/notepad++.exe&quot; -multiInst -notabbar -nosession -noPlugin &quot;$*&quot;
  </code></pre>
  <p>And used:</p>
  <pre><code>#!/bin/sh
  
  &quot;C:\Users\gep13\AppData\Local\Code\app-0.1.0\Code.exe&quot; &quot;$*&quot;
  </code></pre>
  <p>But this results in an error message:</p>
  <pre><code>C:\temp\testrepo [master +1 ~0 -0]&gt; git commit
  [8660:0504/084217:ERROR:crash_reporter_win.cc(70)] Cannot initialize out-of-process crash handler
  Aborting commit due to empty commit message.
  C:\temp\testrepo [master +1 ~0 -0]&gt;
  </code></pre>
  <p>Code opens up correctly, with the expected content, but it isn't waiting on the response, i.e. clicking save and closing the window to return to prompt.</p>
  <p><strong>UPDATE 2:</strong></p>
  <p>I have just heard back from one of the developers working on VSCode.  Looks like this functionality currently isn't supported :-(</p>
  <p><a href="https://twitter.com/IsidorN/status/595501573880553472" rel="noreferrer">https://twitter.com/IsidorN/status/595501573880553472</a></p>
  <p>If you are interested in seeing this feature get added, you might want to think about adding your votes here:</p>
  <p><a href="http://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7756482-support-git-configure-diff-and-merge-tools" rel="noreferrer">http://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7756482-support-git-configure-diff-and-merge-tools</a></p>
  <p><strong>UPDATE 3:</strong></p>
  <p>I have been <a href="https://twitter.com/shanselman/status/595604230234210304" rel="noreferrer">reliably informed</a> that this feature has been picked up by the VSCode team, so I am looking forward to a future release that will include it.</p>
  <p><strong>UPDATE 4:</strong></p>
  <p>Thanks to @f-boucheros comment below, I have been able to get VS Code working as the default editor for commit comments, rebase, etc.  I would still  like to see if it is possible to use it as the diff tool as well.</p>
  <p><strong>UPDATE 5:</strong></p>
  <p>As per the accepted answer for the question, this is now possible using the V1.0 release of code.</p>