git bash windows 对阵 WSL
git bash on windows vs. WSL
我在我的 windows 上下载了 git,还有其他一些东西,包括 git bash。
虽然我不知道为什么 bash 终端被包含在 "git" 中,
它不仅支持 git 的功能,还支持 mkdir、cp、mv 等其他功能,就像真正的 linux bash 终端一样。
最近我开始了解 WSL(Windows Linux 的子系统),它使 bash 终端在 windows 中可用。
gitbash功能上是不是比WSL差很多?
它是否包含一些 WSL 没有的约束?
Git for Windows is using the mingw-w64 project (as ) and msys2.
在“How are msys, msys2, and msysgit related to each other?”中查看更多信息。
这与模拟实际 Linux 分布的 WSL 有很大不同。
Does it contain some constraints that WSL doesn't have?
Windows 的 Git 基于 POSIX compatibility layer, which has limitations: POSIX support is deprecated since Windows 8。
注意:WSL 即将 , which uses an entirely new architecture that uses a real Linux kernel。
如果您的程序依赖于 Git bash(而不是 WSL/WSL2 bash),请务必将 Git 用于 Windows 首先在 your
PATH 中,如 Jon Skeet described in "USING “GIT BASH” FROM APPVEYOR", in an AppVeyor CI environment.
# Make sure we get the bash that comes with git, not WSL bash
- ps: $env:Path = "C:\Program Files\Git\bin;$env:Path"
WSL 在 Windows 工具中更改文件时不会触发文件处理程序 - https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/
因此,您不能 运行 WSL 中的开发服务器,因为对 Windows 编辑器所做的代码更改不会反映在开发服务器中。
我在我的 windows 上下载了 git,还有其他一些东西,包括 git bash。
虽然我不知道为什么 bash 终端被包含在 "git" 中, 它不仅支持 git 的功能,还支持 mkdir、cp、mv 等其他功能,就像真正的 linux bash 终端一样。
最近我开始了解 WSL(Windows Linux 的子系统),它使 bash 终端在 windows 中可用。
gitbash功能上是不是比WSL差很多?
它是否包含一些 WSL 没有的约束?
Git for Windows is using the mingw-w64 project (as
在“How are msys, msys2, and msysgit related to each other?”中查看更多信息。
这与模拟实际 Linux 分布的 WSL 有很大不同。
Does it contain some constraints that WSL doesn't have?
Windows 的 Git 基于 POSIX compatibility layer, which has limitations: POSIX support is deprecated since Windows 8。
注意:WSL 即将
如果您的程序依赖于 Git bash(而不是 WSL/WSL2 bash),请务必将 Git 用于 Windows 首先在 your
PATH 中,如 Jon Skeet described in "USING “GIT BASH” FROM APPVEYOR", in an AppVeyor CI environment.
# Make sure we get the bash that comes with git, not WSL bash
- ps: $env:Path = "C:\Program Files\Git\bin;$env:Path"
WSL 在 Windows 工具中更改文件时不会触发文件处理程序 - https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/
因此,您不能 运行 WSL 中的开发服务器,因为对 Windows 编辑器所做的代码更改不会反映在开发服务器中。