News for hackers. Stuff that matters.
Re:Getting Started with Git Bash by riedel on Saturday February 05, 2022 @10:29AM (#30222001)
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.
Re:Getting Started with Git Bash by otachack on Saturday February 05, 2022 @10:56AM (#30222276)
My 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.

Re:Getting Started with Git Bash by jliu70 on Saturday February 05, 2022 @01:39PM (#30224226)
The 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-interacti...

Re:Getting Started with Git Bash by otachack on Monday February 14, 2022 @11:26AM (#30333922)
I'll try it out! Thank you.
Re:Getting Started with Git Bash by ChrisSD on Saturday February 05, 2022 @11:02AM (#30222354)
What's the Python issue?
Re:Getting Started with Git Bash by lozenge on Saturday February 05, 2022 @11:46AM (#30222911)
There'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.

Re:Getting Started with Git Bash by pletnes on Saturday February 05, 2022 @12:32PM (#30223450)
Git 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.
Re:Getting Started with Git Bash by pletnes on Saturday February 05, 2022 @12:26PM (#30223388)
If 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.

Re:Getting Started with Git Bash by gruez on Saturday February 05, 2022 @11:37AM (#30222794)
>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?

Re:Getting Started with Git Bash by leppr on Saturday February 05, 2022 @10:52AM (#30222240)
It'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.

Re:Getting Started with Git Bash by michaelsbradley on Saturday February 05, 2022 @10:58AM (#30222310)
> 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.

Re:Getting Started with Git Bash by riedel on Saturday February 05, 2022 @11:06AM (#30222397)
Totally: 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.

Re:Getting Started with Git Bash by pletnes on Saturday February 05, 2022 @12:30PM (#30223430)
One 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.
Re:Getting Started with Git Bash by riedel on Saturday February 05, 2022 @10:58AM (#30222304)
Cannot 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??

Re:Getting Started with Git Bash by michaelsbradley on Saturday February 05, 2022 @11:03AM (#30222367)
> 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).

Re:Getting Started with Git Bash by riedel on Saturday February 05, 2022 @11:08AM (#30222432)
Sorry for being sloppy I meant msys2.
Re:Getting Started with Git Bash by ur-whale on Saturday February 05, 2022 @12:40PM (#30223524)
> 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.