Languages
[Edit]
EN

Git for Windows - print current working directory in Windows format

9 points
Created by:
OneCricketer
340

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

john@DESKTOP-PC MINGW64 /c/projects (main)
$ pwd -W
C:/projects

 

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join