The enterprise bank I work for needs a business justification to spend resources to figure out if there's a business justification for allowing the installation of WSL. I asked in 2019.
Bouncing between my personal computers and my Windows work computer, what they've done to make git so slow... it makes me sad. On a brand new developer workstation, the git-prompt invocation in PS1 takes over a second to complete.
Developers who never used git before don't like it and I understand why. It's like a scene from Harrison Bergeron, like Git Bash has heavy objects strapped to it to make it at least as slow as everything else.
It’s owing to the high number of syscalls not being a big drag on Linux, etc. while causing noticeable slowdowns on top of Windows’ architecture/filesystem... something like that. A Microsoft engineer did a good writeup on it several years ago, if I remember correctly. I’ll try to find a link.
I was recently in a very similar situation to you and found that the $PATH of my git bash contained a network drive. Removing this for me made it still slow but useable.
This also made any programs I was running in it - like vim - useable too.
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.
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.
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.
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.
> 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.
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.
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.
Nice intro. I had to go through this yesterday on a cloud instance and hadn’t used windows in awhile. Instead of using this install GUI I first installed chocolatey. Once that was ready from powershell it’s a quick ‘choco install git’.
Getting visual studio build tools wasn’t as easy (was compiling rust/c++ so had it as a dependency). I managed to avoid Internet explorer entirely by ‘choco install Firefox’ and then managed to go through the painful web workflow VS community edition download.
I really wonder how I managed on Windows for so long in my former career. It’s night and day vs Linux or Mac.
With MSYS2 installed on your Windows cloud instance, in a Bash shell for e.g. its UCRT64 environment, you could use pacman to get your dev setup in place:
Other build tools like cmake, etc. are also readily available via pacman. I've found this approach helps make developing on Windows a lot more like I want, i.e. more like my experiences on Linux and macOS.
Whether the "-toolchain" package in the install-list above (gcc and friends) is suitable for your needs, I'm not sure, though note that the "-rust" package brings in llvm automatically, so your bases are probably covered unless you have a strict requirement to use Microsoft's toolchain.
will get you what you listed. the "-s winget" option bypasses the Microsoft Store source, but you can permanently remove that with "winget source remove msstore". if you want to browse for more apps (and generate commands to install them) you can with https://winstall.app.
I co-maintain a piece of software and I would love to have a Windows binary. We have few dependencies, all well behaved and we dont use any OS APIs. It's a Cmake projectand I'm sure if I would get it to compile on Windows it would work fine.
I gave it a shot twice, first by hand, second time through Github CI. I just don't get how any of this works on Windows.
This article is from Jan 2022, I don't understand why the author didn't mention wsl. Even just to point out if it's lacking compared to gitbash. Can anyone chime in?
Git Bash is a nice tool. I used it for some time, and still do in some circumstances.
But when I wanted to have more and do more from the command-line re: a *nix-like dev experience on Windows for building native Windows software, I found my way to MSYS2[1]. Note that Git Bash is in parts based on MSYS2, but installing and using MSYS2 is not 1-1 with installing and using Git Bash:
At first I didn't quite understand what I was working with, but MSYS2's website provides the needed info, I just had to take the time to read it.
The History[2] page helped me understand better the relationships and differences between MSYS2, MSYS (not "2"), MinGW/-w64, and Cygwin. One of the more salient points being:
MSYS2 is an independent rewrite of MSYS, based on modern Cygwin and MinGW-w64 with the aim of better interoperability with native Windows software ... MSYS2 is ideologically a successor to MSYS and MinGW. MSYS -- although definitely useful -- is really old and getting in the way of developers. MSYS2 was created to replace the original MSYS while avoiding its problems.
Other pages provide complementary information on that same topic.
Another thing I appreciated was the explanation of MSYS2's environments[3]. Being able to painlessly switch away from MSVCRT to UCRT was helpful in solving some UTF-8 difficulties I was experiencing.
Package management with pacman[4] is rather pleasant, and the setup-msys2[5] GitHub Action makes it simple to provide your GHA workflow with the tools and libs you want.
Whenever I've encountered a problem or had a question I couldn't answer via web search, the community on the MSYS2 Discord server[6] has always been quick and happy to help.
Sure now you have WSL and countless other options but git bash is one click away and works surprisingly well.