最佳答案

只需将 <c:\path\to\git\bin> 添加到您的 %PATH% 中,您就可以使用 Unix 命令 packaged with msysgit

例如, lsgrep 会起作用。

C:\prgs>which ls
C:\prgs\git\PortableGit-1.9.5-preview20141217\bin\ls.EXE

这些命令是 MinGw/msys project 的一部分,它为原生 Microsoft Windows 应用程序提供了一个极简的开发环境。

这就是用于构建 git 本身及其 Linux 命令集合(作为 Windows 可执行文件)的内容。

更多信息请访问:
  • Difference between msysgit and Cygwin + git?”。
  • "What is the exact meaning of Git Bash? "
  • 关于git - 我们如何通过 git 在 windows 上使用 linux 命令?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29296899/

    10-14 17:55
    查看更多