4 ms·
I really wonder what make git bash so much more popular than msys2 or cygwin. Ever since switching from Linux/FreeBSD cygwin has lessened the pain of windows a
by riedel 5y ago
I really wonder what make git bash so much more popular than msys2 or cygwin. Ever since switching from Linux/FreeBSD cygwin has lessened the pain of windows a lot.
- leppr 5y agoIt's simple, portable, and you can just execute EXEs from it. Cygwin has a more complex setup and not great compatibility with windows executables, IIRC.
- riedel 5y agoCannot echo this at all. I use native binaries like pandoc or chocolatey from cygwin all the time. The only issue may be with stdout and file paths. There is still msys, if you want more windows. I think git bash mostly is only a packaged msys distribution, isn't it??
- michaelsbradley 5y ago> There is still msys MSYS2 is the better option, and is not "MSYS version 2", it's an independent rewrite. > git bash mostly is only a packaged msys distribution, isn't it? It's in parts based on MSYS2, but doesn't give you a "full install" (or whatever is the best way to phrase it).
- riedel 5y agoSorry for being sloppy I meant msys2.
- michaelsbradley 5y ago> Cygwin has a more complex setup and not great compatibility with windows executables, IIRC. And that's how/why MSYS2 is a nice alternative to Cygwin, especially its environments that use UCRT instead of MSVCRT when considering "compatibility" from the perspective of building and shipping software that doesn't require the user to first install a special environment/runtime. UCRT ships by default on Windows 10.
- riedel 5y agoTotally: if you want to redistribute stuff msys2 makes this much easier. I have both on my system. As a shell environment I like cygwin. With posix compatibility I can compile nearly everything (that does not use libuv). I do not get the narrative of complicated setup for this use case. Download installer and click next a few times: does not seem to be so difficult. The cygwin package installer IMHO is a bit easier to use than pacman.
- pletnes 5y agoOne example issue is that cygwin tries much harder to enforce a «linux / chmod» view of file permissions, which it tries to map onto the underlying windows/ ntfs permissions. This can cause issues like creating files that won’t (easily) be deleted and other yak-shaving-inducing problems.
- otachack 5y agoMy experience with Cygwin back in college (~2008) was that it was obtuse and hard to understand. Granted, I didn't have the knowledge of *nix CLI I have now. But looking back and comparing it to Git Bash experience of today, with a simple installer to run, Git Bash wins in convenience. It does suck in other areas though such as trying to start a Python interpreter session (I fallback to PowerShell for that) Cygwin has probably grown a lot better since but I don't see a reason to try it, personally.
- ChrisSD 5y agoWhat's the Python issue?
- lozenge 5y agoThere's no package manager so there's no way to install things and there's no Python included. You could run your Windows Python but the paths will be wrong (C:\ instead of /c/), etc.
- pletnes 5y agoGit bash will translate /c/ to C:\ so that’s only sometimes true. But it won’t translate //c/ or if you set a certain env var… etc. Having to recall all these rules is one reason I dislike working in git bash on windows.
- jliu70 5y agoThe workaround to running the python interpreter from git bash is to preface python with the command winpty like so `winpty python` Reference: http://willi.am/blog/2016/08/08/docker-for-windows-interactive-sessions-in-mintty-git-bash/ http://willi.am/blog/2016/08/08/docker-for-windows-interacti...
- otachack 5y agoI'll try it out! Thank you.
- gruez 5y ago>I really wonder what make git bash so much more popular than msys2 or cygwin Not sure about cygwin, but I thought git bash was based on msys2?
- pletnes 5y agoIf you google «git download» or «install git», that’s what you get. There’s also no package manager or 3rd party packages to worry about or learn how to use. That’s my gut feel, at least. Git bash is based on some ancient cygwin version. You can see that e.g. the «cygpath» utility is still there. MinGW/Msys forked from cygwin due to some techno-political disagreement that I can’t be bothered to learn more about.
- ur-whale 5y ago> I really wonder what make git bash so much more popular than msys2 or cygwin cygwin is so slow it's basically unusable for most tasks except the simplest ones. especially if you run anything with threads.