What is Git?
Git is a version control system — it records every change you make to your code, so you can see history, undo mistakes, work on features without breaking the main code, and collaborate with others without overwriting each other's work. It is the foundation of virtually all modern software development.
When should you use it?
Always. From your very first project. Even working alone, Git gives you a safety net (undo any change), a history (see what changed and when), and the ability to experiment safely on branches.
How to set it up
Install Git, then in any project folder run git init. Configure your name and email once. That is it — you are tracking changes.
How it connects to your code
The core loop: git add (stage changes), git commit (save a snapshot with a message), git push (send to GitHub). Branches let you work on features in isolation: git branch, git checkout, git merge.