title: How to setup git on windows with cygwin, git bash and git in a vagrant VM?
body: <h1>My Setup</h1>
  
  <p>We are using Windows 10 at work.
  I had the task to build a development VM with Vagrant which we all want to use.</p>
  
  <p>We are mounting our git folders into the VM via the Vagrant SSH mount which works perfect for now.</p>
  
  <p>We are also using Visual Studio Code as Editor.</p>
  
  <h1>My Goal</h1>
  
  <p>I want to use git in cygwin (for the windows users) and git in the VM seamlessly.</p>
  
  <p>And of course we want to use the feature of Visual studio code to hightlight the changed files. As I understand it right Visual Studio Code is using the git implementation from the git bash.
  But this is a secondary requirement.</p>
  
  <h2>My config</h2>
  
  <p>On all machine I have the following <strong>.gitconfig</strong>:</p>
  
  <pre><code>[core]
      autocrlf = input
      editor = vim
      eol = lf
      filemode = false
  </code></pre>
  
  <h1>My Problem</h1>
  
  <p>I clone a repo and the shells show me differnt outputs</p>
  
  <p><strong>git bash</strong>:</p>
  
  <pre><code>pwd
  /c/Users/user/git/docker-install
  &gt;git status
  On branch master
  Your branch is up to date with 'origin/master'.
  
  Changes not staged for commit:
    (use "git add &lt;file&gt;..." to update what will be committed)
    (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  
          modified:   .gitattributes
  
  no changes added to commit (use "git add" and/or "git commit -a")
  &gt;git diff
  diff --git a/.gitattributes b/.gitattributes
  old mode 100755
  new mode 100644
  </code></pre>
  
  <p><strong>cygwin</strong>:</p>
  
  <pre><code>user@machine /cygdrive/c/Users/user/git/docker-install
  $ git status
  On branch master
  Your branch is up to date with 'origin/master'.
  
  nothing to commit, working tree clean
  
  user@machine /cygdrive/c/Users/user/git/docker-install
  $ git diff
  
  user@machine /cygdrive/c/Users/user/git/docker-install
  $
  </code></pre>
  
  <p><strong>Git vagrant VM</strong>:</p>
  
  <pre><code>[vagrant@vagrant docker-install (⎈ |minikube:default)]$ git status
  On branch master
  Your branch is up-to-date with 'origin/master'.
  Changes not staged for commit:
    (use "git add &lt;file&gt;..." to update what will be committed)
    (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  
          modified:   .gitattributes
  
  no changes added to commit (use "git add" and/or "git commit -a")
  [vagrant@vagrant docker-install (⎈ |minikube:default)]$ git diff
  diff --git a/.gitattributes b/.gitattributes
  old mode 100755
  new mode 100644
  [vagrant@vagrant docker-install (⎈ |minikube:default)]$
  </code></pre>
  
  <h2>My .gitattributes in this this repo</h2>
  
  <p><code>* text=auto</code></p>
  
  <h1>How should I setup my gitconfigs?</h1>
  
  <p>I read a lot of articles, spend a lot of time but I am still confused how we should setup our environment.</p>
  
  <p>Can someone help me on this one?</p>