Step 0: installing Git
Before you set up a repository, make sure Git is installed. In the terminal run git --version. If the command is not found, install Git using the instructions for your OS below, then check the version again.
Identity (git config)
Git records the author on every commit. Name and email are set via git config; without sensible values you get warnings or bad metadata in history.
Configuration levels
Useful extras
For convenience in the terminal it helps to enable colored output and set an editor for commit messages. On Windows, when mixing with Linux tooling, configure line endings (CRLF/LF) so diff is not noisy.