EN
Git for Windows - print current working directory in Windows format (Bash)
9
points
In this short article, we would like to show how to return the current working directory path (pwd) in Microsoft Windows format using Git Bash under Windows.
Quick solution:
pwd -W
Where: -W works only under Windows Git Bash returning path in the following format: C:/Path/To/Directory.
Practical example
In this example, /c means C: drive, so /c/projects will be printed as C:/projects path.
john@DESKTOP-PC MINGW64 /c/projects (main)
$ pwd -W
C:/projects