title: Visual Studio Code cannot detect installed git AND 'error launching git: The filename or extension is too long.'
body: <p>I have looked at most of the posts describing the first error on the title : <strong>"Visual Studio Code cannot detect installed git"</strong>.</p>
  
  <p>Nevertheless, I believe that the second error <strong>"error launching git: The filename or extension is too long."</strong> generates the first one.</p>
  
  <p>Could you help me?</p>
  
  <ol>
  <li>Git works while using "Git Bash"</li>
  <li>VS Code indicates that <em>git not found. install it or configure it using <strong>'git.path'</em></strong>
  <a href="https://i.stack.imgur.com/RH7m3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RH7m3.png" alt="vscode git not found. install it or configure it using &#39;git.path&#39;"></a></li>
  <li>VS Code indicates that <strong>VSCODE : no source control providers registered</strong>
  <a href="https://i.stack.imgur.com/MQQek.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQQek.png" alt="VSCODE : no source control providers registered"></a></li>
  <li>The <em>.vscode/settings.json</em> contains <strong>"git.path": "c:\Program Files\Git\bin\git.exe"</strong>
  <a href="https://i.stack.imgur.com/ZqTvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZqTvQ.png" alt="enter image description here"></a>
  
  <ol start="5">
  <li>Running on the <em>VSCode Terminal</em> the command <em>Git</em> or <em>Git version</em> generates the same error : <strong>error launching git: The filename or extension is too long.</strong> </li>
  <li><strong>Git works perfectly if using Git bash</strong>
  <a href="https://i.stack.imgur.com/HDfmn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDfmn.png" alt="Git works perfectly if using Git bash"></a></li>
  </ol></li>
  </ol>
  
  <p>Any idea? </p>
  
  <p>Thank you for the time invested!</p>