# Git Bash Git Bash is a [[Bash]] emulation for Windows, bundled with [[Git]] for Windows. It provides a Unix-like command line experience on Windows, allowing users to run Bash scripts and use common Unix utilities. Git Bash combines MSYS2 (a collection of Unix tools for Windows) with Bash, making it possible to use the same commands and scripts across Windows, macOS, and Linux. ## Key Features - **Bash shell**: Full Bash functionality on Windows - **Unix utilities**: `grep`, `sed`, `awk`, `find`, `ssh`, and more - **Git integration**: Optimized for Git operations - **Path translation**: Automatically converts between Windows and Unix paths - **Mintty terminal**: Modern terminal emulator with good Unicode support ## Why Use Git Bash - **Consistency**: Use the same commands as macOS/Linux users - **Scripts**: Run Bash scripts without modification - **Git workflows**: Native Git experience on Windows - **SSH**: Built-in SSH client for remote connections - **Familiar tools**: Access to standard Unix utilities ## Common Path Translations ``` Windows: C:\Users\name\Documents Git Bash: /c/Users/name/Documents Windows: D:\Projects Git Bash: /d/Projects ``` ## Installation Git Bash comes bundled with [[Git]] for Windows: - Download from https://git-scm.com/download/win - Select "Git Bash Here" context menu option during install - Optionally add to Windows Terminal ## Limitations - Not a full Linux environment (use [[Windows Subsystem for Linux (WSL)]] for that) - Some Unix tools may behave slightly differently - Windows-specific paths need translation - Performance can be slower than native shells ## Git Bash vs Alternatives | Tool | Description | |------|-------------| | Git Bash | Lightweight, bundled with Git | | WSL | Full Linux subsystem, heavier | | Cygwin | Comprehensive Unix environment | | MSYS2 | Git Bash's underlying technology | | PowerShell | Native Windows, different syntax | ## References - https://gitforwindows.org/ - https://git-scm.com/download/win ## Related - [[Bash]] - [[Zsh (Z Shell)]] - [[Shell]] - [[Git]] - [[Command Line Interface (CLI)]] - [[Windows Subsystem for Linux (WSL)]]