windows - 在 Git for windows "git bash"中,如何使用 cmd 和 Windows 资源管理器使用的 Windows 路径格式中的 "print working directory"?

标签 windows git bash git-for-windows

在Windows上使用Git for Windows "git bash"时,如何方便地打印Windows路径表示中的工作目录,例如

D:\foo\bar

类似于使用 'pwd' 获取 Unix 表示

/d/foo/bar/

这样路径可以被 Windows 资源管理器和 cmd 控制台读取?

最佳答案

在 Git Bash 中:

$ cmd //c cd
C:\Program Files\Git

注意双斜线。对于正斜杠,如评论中所述:

$ pwd -W
C:/Program Files/Git

关于windows - 在 Git for windows "git bash"中,如何使用 cmd 和 Windows 资源管理器使用的 Windows 路径格式中的 "print working directory"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44842275/

相关文章:

windows - curl : (1) Protocol https not supported or disabled in libcurl [windows XP]

c++ - 自定义流实用程序

bash 脚本参数

Python脚本递归打开目录中的.rar文件

git - 如何快速备份我想通过 git clean 删除的未跟踪文件?

c++ - 进程 "mingw32-make.exe"崩溃错误

c++ - 读者作家 - 作家线程总是卡在多个读者线程中

Heroku 应用程序名称更改后 Git 推送失败

git - git 如何知道要使用哪个 ssh key 进行操作?

Git 获取远程分支