On macOS and Linux, opening a terminal gives you bash or zsh: the same syntax as 99% of the tutorials you will come across. On Windows, it is different: by default you have PowerShell, whose syntax and commands are not compatible. The easy fix is to install Git Bash, which gives you a standard bash shell on Windows.
Why Git Bash instead of PowerShell
PowerShell is very powerful, but it has its own conventions: variables with $, operators like -eq instead of ==, no && chaining (in PowerShell 5.1), different pipe syntax. If you follow a tutorial written for macOS or Linux, it will not work as-is under PowerShell.
Git Bash solves this: it is a mini Unix environment layered on Windows, shipped for free with Git for Windows. You get bash, plus most of the standard Unix tools (grep, sed, awk, curl, etc.).
Installing Git Bash
Open Git Bash. The prompt looks like bloki@DESKTOP MINGW64 ~: you are in a bash shell, just like on Linux.
Confirm it is bash
If you see /usr/bin/bash (or similar), you are on bash.
Three Windows traps to know
1. Absolute paths
You can write an absolute path two ways in Git Bash:
Both work. The /c/... form (forward slash) is generally more convenient: no need to escape \, and it copies and pastes cleanly in scripts.
2. cd does not persist across tool invocations
If a tool (like an editor, an external script, or Claude Code) launches bash multiple times, the cd you do in one command is not seen by the next one. Each invocation starts back from the original directory.
Solution: chain in the same command using a subshell or &&.
3. Python heredocs with apostrophes
You may need to pipe Python code into an interpreter via a heredoc:
This works as long as your Python does not contain lone apostrophes inside strings. Otherwise Git Bash on Windows fails with unexpected EOF. In that case, write your script to a .py file and run it normally - do not pipe it via heredoc.
