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:
xxxxxxxxxx
1
pwd -W
Where: -W
works only under Windows Git Bash returning path in the following format: C:/Path/To/Directory
.
In this example, /c
means C:
drive, so /c/projects
will be printed as C:/projects
path.
xxxxxxxxxx
1
john@DESKTOP-PC MINGW64 /c/projects (main)
2
$ pwd -W
3
C:/projects