Skip to content

Mingw64 - Git Bash - Windows

Install Git with Mingw64 on Windows in order to have Git Bash Terminal on Windows.
Then you could add some .exe executables in Mingw64 usr/bin and use them like On Linux

Download and Install Git for Windows

After the installation, Mingw64_Git_path will be located at

  • C:\Program Files\Git\ : if installed with administrator administrator privilege
  • C:\Users\$USER/AppData\Local\Prgrams\Git
  • Another way to find the path: Open the Git Bash , On TaskBar right click on its icom, then right click on Git Bash
  • Click on Properties and get your Gitfolder path

Add Tools

Download your tool(kubectl, helm, oc, ...) package here then unzip it.

Copy the content of each folder bin, lib, include and add thenm in the same folder of Mingw64_Git_path\usr
You could add the share folder content also.

In your Git Bash , you can add .bashrc like on Linux

Integrating the Git Bash Terminal with the WIndows Terminal

When I started using commands like kubectl exec -it ... , I got tty errors: Cannot allocate tty.
The solution was to use Git Bash directly through the Windows terminal instead of the default Mingw64 terminal.

  1. Open Windows Terminal
  2. Right click on Terminal then click on Parameters
  3. Add nw profile
  4. Name: Git Bash
  5. Command Line: Mingw64_Git_path\bin\bash.exe
  6. Starting Directory: %HOMEDRIVE%%HOMEPATH% OR Stick Use Parent process directory