Is Git's reliance on POSIX features still an issue on Windows?

淺唱寂寞╮ 提交于 2019-12-07 14:17:51

问题


From what I've read, Git seems to rely heavily on POSIX-specific features, causing compatibility problems on Windows. However, I don't understand specifically what POSIX features Git uses which cannot be replicated easily on Windows.

Because of this issue, I've been very hesitant to start working with Git on my Windows computer. What POSIX features does Git use, and is this still an issue? How have projects like msysGit managed to circumvent these problems?


回答1:


Yes, Git does rely on a POSIX system, but be advised that POSIX specifies a lot of things: a shell environment (i.e. command line environment), operating system interfaces (i.e. libraries that implement file I/O, threading, etc.), regular expressions, directory structure (i.e. /dev/null, /tmp), and utilities.

Given how I've defined POSIX, it should follow that Git relies on practically all of POSIX. However, if you read the Git developers' CodingGuidelines, you'll see that Git uses POSIX as a means of implementing wide portability.

msysGit gets around the compatibility problems because it is a POSIX environment.

Running Git on Windows generally means running on top of a POSIX run-time environment. This is the basis for Git for Windows. You first start Git BASH, and in that environment you run Git commands.

I can assure you that Git works fine in this manner!

If POSIX and the command line make you hesitant, you may want to explore Git UIs like Atlassian SourceTree or GitHub for Windows.



来源:https://stackoverflow.com/questions/22166612/is-gits-reliance-on-posix-features-still-an-issue-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!