Skip to content
BloggerSpot
Website Buildingguide

Terminal, CMD, PowerShell, Bash: Why the Same Command Works in One Window and Not Another

By The BloggerSpot Author
Comparison of CMD, PowerShell, and Git Bash terminal prompts

If you’ve ever typed a command exactly as instructed and gotten 'git' is not recognized as an internal or external command — even right after installing Git — this page is for you. This confused me more than almost anything else in my entire first website build, and it’s rarely explained clearly anywhere.

The Core Misunderstanding

“Terminal” isn’t a single thing. It’s just the window — a black or dark box where you type commands. The terminal itself doesn’t understand anything. What matters is which program is running inside that window, because that program decides what commands it recognizes.

On Windows, you’ll typically run into three different programs that can live inside a terminal window:

Program What it is Comes with Git built in?
CMD (Command Prompt) Windows’ original command-line program, since the MS-DOS days No
PowerShell Windows’ newer, more powerful command-line program — often what opens by default in VS Code on Windows No
Git Bash A program installed specifically by the Git for Windows installer, giving you a Mac/Linux-style command line Yes — always

“Bash” itself is the actual command language used natively on Mac and Linux. Git Bash is Windows’ way of giving you that same experience.

Why This Actually Breaks Things

Installing Git doesn’t automatically make the word git work in every terminal program on your computer. It only works in the ones that know where to look for it — a system setting called PATH. CMD and PowerShell only recognize git if Git’s install folder has been explicitly added to that PATH list. Git Bash always works, because it is Git’s own dedicated terminal.

Here’s the part that caused me the most confusion: VS Code’s Source Control panel (the buttons — Commit, Publish Branch, etc.) doesn’t use the terminal or PATH at all. It talks to Git directly through its own internal code. That’s why the buttons in VS Code could commit and push my files perfectly fine, while typing git --version into VS Code’s own integrated terminal gave me “not recognized.”

How to Tell Which One You’re In

Look at your terminal prompt:

  • PS C:\Users\you> → You’re in PowerShell
  • C:\Users\you> (no “PS”) → You’re in CMD
  • you@machine MINGW64 ~ → You’re in Git Bash

The Practical Fix

If you need to type Git commands directly and want them to just work: open Git Bash specifically, not whatever terminal opens by default. Right-click inside any folder and look for a “Git Bash Here” option.

If you’d rather avoid the terminal entirely for Git tasks, that’s also completely valid. → Drag-and-Drop vs Git

The Takeaway

Git being “installed” and Git being “usable in this specific window” are two different facts, and nothing about the error message tells you they can disagree. Once you know CMD, PowerShell, and Git Bash are three different programs with three different relationships to PATH, most of the confusion stops being mysterious.