In this article I’ll document my process for setting up Git Bash / MINGW /
MSYS2 on Windows including some additional configuration (e.g. installing make
and apply
some customizations via .bashrc
).
Table of contents
- Introduction
- How to install and update Git Bash / MINGW / MSYS2 via Git for Windows
- Common issues
- Miscellaneous
Introduction
When I was learning git
I started with the fantastic
Git for Windows package, that is maintained in the
git-for-windows/git
Github repository and comes with
Git Bash, a shell that offers a
Unix-terminal like experience. It uses
MINGW and MSYS2 under the hood
and does not only provide git
but also a bunch of other common Linux utilities like
bash
sed
awk
ls
cp
rm
...
I believe the main “shell” is actually powered by MINGW64 as
that’s what will be shown by default:
Thus, I will refer to the tool as MINGW shell or Git Bash throughout this article.
I have been using MINGW for almost 10 years now, and it is still my go-to shell for Windows. I
could just never warm up to WSL, because the file sharing performance between WSL and native
Windows files was (is?) horrible – but that’s a different story.
How to install and update Git Bash / MINGW / MSYS2 via Git for Windows
You can find the latest Git for Windows installation package directly at the homepage of
https://gitforwindows.org/. Older releases can be found on
Github in the
Releases section of the git-for-windows/git
repository
Follow the instructions in the
How to Install Git Bash on Windows article on git-tower.com
to get a guided tour through the setup process.
After the installation is finished, I usually create a desktop icon and assign the shortcut
CTRL + ALT + B
(for “bash”) so that I can open a new shell session conveniently via keyboard.
Update MINGW
To update Git for Windows, you can simply run
git update-git-for-windows
See also the
Git for Windows FAQ under “How do I update Git for Windows upon new releases?”
Git for Windows comes with a tool to check for updates and offer to install them. Whether or not you enabled auto-updates during installation, you can manually run
git update-git-for-windows
.
Truncated by Planet PHP, read more at the original (another 19960 bytes)