git - 我们如何通过git在windows上使用linux命令?

标签 git

"We all use linux commands in git even in windows. I wanted to know how does it let these linux commands run on windows?"

最佳答案

只需添加 <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 的一部分为 native Microsoft Windows 应用程序提供极简开发环境。

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

查看更多:

关于git - 我们如何通过git在windows上使用linux命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29296899/

相关文章:

git - Maven Release-plugin "tag already exists"用于不存在的标签

git filter-branch 删除文件夹失败

git - 非递归 git log 和 diff

git - 将 bonobo git 服务器存储库移动到另一个驱动器

Git SVN 错误 : a Git process crashed in the repository earlier

git - 为什么在Android Studio 3.4.2 中从Git clone 项目时只创建本地master 分支?

git - 尝试使用 nodejs 运行 git shortlog 时,Exec 不返回任何内容

git - 如何从 HEAD 获取 Git 日志?

git - .gitignore .js 由 TypeScript 制作的文件

Git 差异 : how to do the opposite of -G<regex>?