Getting Started with Git Bash
git-tower.com
git-tower.com
Sure now you have WSL and countless other options but git bash is one click away and works surprisingly well.
Cygwin has a more complex setup and not great compatibility with windows executables, IIRC.
There is still msys, if you want more windows. I think git bash mostly is only a packaged msys distribution, isn't it??
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).
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.
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.
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.
You could run your Windows Python but the paths will be wrong (C:\ instead of /c/), etc.
Reference: http://willi.am/blog/2016/08/08/docker-for-windows-interacti...
Not sure about cygwin, but I thought git bash was based on msys2?
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 is so slow it's basically unusable for most tasks except the simplest ones.
especially if you run anything with threads.
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.
https://github.com/Microsoft/WSL/issues/873#issuecomment-425...
This also made any programs I was running in it - like vim - useable too.
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.
pacman -S base-devel git mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-rust
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.
winget install -s winget git ; winget install -s winget firefox ; winget install -s winget vs2022-buildtools --interactive
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 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.
with WSL2 I can use git directly, so I uninstalled git-bash and all those msys/cygwin/mingw, things changed, embrace WSL2, move on.
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.
[2] https://www.msys2.org/wiki/History/
[3] https://www.msys2.org/docs/environments/
[4] https://www.msys2.org/docs/package-management/
[&] https://packages.msys2.org/queue
Wow, they have Perl! And curl, ssh/sshd, gpg, md5/sha/lzma/zip, nano/vim/antiword, openssl, strace, and Busybox. That's a decent little environment!
versus
msys2?
E.g., with msys2 i can install sshd so that I can use a windows vm as a gitlab runner. I can also use pacman to install build deps.
Can i with git bash?
If you want to use pacman you can either use Git Windows SDK, or just plain MSYS2.