title: Changing directory in Git-Bash: using Windows-style directory addresses in MINGW64 on Windows machines
body: <h2>Question:</h2>
  
  <p><code>git-bash.exe</code>, or <code>MINGW64</code>, recognizes <code>cd</code> commands for directories whose addresses are given in form of: <code>/Drive_Name/Folder1/Subfolder1</code>. An example for changing to home dir for a Windows machine users is: <code>cd /c/users/USERNAME</code>.</p>
  
  <ul>
  <li><p>Is it possible to use the following syntax?
  <code>
  cd c:\users\USERNAME
  </code>
  Note, the directory address is given in its "native" format: the syntax for which the Windows OS recognizes.</p></li>
  <li><p>Alternatively, is there a way to automatically change all the backward slashes into forward slashes when pasting into the Git-bash window?</p></li>
  </ul>
  
  <h2>Background</h2>
  
  <p>I am using <code>git-bash.exe</code> on a daily basis: to pull and push to Github, to run <code>latexmk</code> for compiling my <code>*.tex</code> documents and to SSH my Linux machines. It would be nice to quickly start a <code>git-bash.exe</code> process at the desired directory location. And, when on Windows OS, getting addresses in form of <code>C:\users\USERNAME\project</code> is the default.</p>
  
  <h2>Assortment of syntax that <code>git-bash.exe</code> likes:</h2>
  
  <ul>
  <li>Format 1: the format native to GNU --- <code>/c/users/USERNAME</code>;</li>
  <li>Format 2: semi-Windows OS format ==> use forward slash as divider --- <code>c:/users/USERNAME</code>;</li>
  <li>Format 3: semi-Windows OS format ==> use TWO backward slashes as divider --- <code>c:\\users\\USERNAME</code> (credits: <a href="https://stackoverflow.com/questions/45134133/changing-directory-in-git-bash-using-windows-style-directory-addresses-in-mingw/45136283#45136283">@VonC</a>)</li>
  </ul>
  
  <h2>Alternatively (pending solutions)</h2>
  
  <p>A valid alternative is to have some third-party process to monitor the clipboard, and switch all the backward backward slashes into forward slashes. In my case, this could happen:</p>
  
  <ol>
  <li><p><strong>[Solved]</strong> In <strong>Vim</strong>, when I use the following mapping to fetch the "parent directory" of the file: <code>nnoremap &lt;leader&gt;&lt;leader&gt;p :let @* = expand("%:p:h")&lt;CR&gt;
  </code></p>
  
  <ul>
  <li>Solution: <code>set shellslash</code>, see "tentative solution" for more details.</li>
  </ul></li>
  <li><p>Though some clipboard-monitor/recording apps: to simply recognize that the string being assigned to the system clipboard is an address for a folder/directory, and replace all backward slashes to be forward slashes.</p></li>
  </ol>