So those of you starting to use Claude Code for the first time - you will probably get a "Git is required for local sessions." message.
You did nothing wrong.
Git is a free tool Claude Code uses behind the scenes to save snapshots of your work (it powers the undo button).
You can do one of tow things. Literally type: "I don't know what that means. Can you walk me through what it is and how to fix it? "
Or - more proactively, on Mac: open the Terminal app, type git --version, press enter.
Your Mac will print a note like xcode-select: note: "No developer tools were found, requesting install -"
That is not an error, it is your Mac offering to install the tools for you.
A separate popup window will pop up asking to install the "command line developer tools" (- it sometimes hides behind your Terminal window, so look for it.)
Click Install, wait a few minutes. (If no popup appears, type xcode-select --install and press enter to force it.)
On Windows: download Git from git-scm.com and click through the installer with the default options. Then restart Claude Code and select your folder again, and git --version will show a version number.