How to use Windows network paths with Git Bash

前端 未结 5 1090
离开以前
离开以前 2021-02-01 00:22

Paths to network resources are denoted in Windows with the \\\\servername\\share\\path\\to\\folder syntax. How does one use such a folder within Git Bash, which use

5条回答
  •  情书的邮戳
    2021-02-01 00:56

    You need to associate a drive letter to the network path you want to use. To do this, execute the following command in the Windows cmd shell:

    pushd \\servername\share\path\to\folder
    

    The next prompt will carry the assigned drive letter, e.g. Z:\path\to\folder. Now, open Git Bash (it will not work with an already running instance) and go to the new created drive letter:

    cd Z:/path/to/folder
    

    or equally

    cd /z/path/to/folder
    

提交回复
热议问题