git init — Starting a Repository
git init is the very first command you run in any new project. It creates a hidden .git/ directory that transforms a plain folder into a full Git repository capable of tracking all your changes.
01.What Happens Under the Hood
Running git init creates a .git/ folder containing: HEAD (pointer to current branch), config (repository settings), objects/ (all your file snapshots stored as blobs), refs/ (branch and tag pointers). This directory IS your entire repository. Delete it and all history disappears — but your files remain untouched.
02.Two Ways to Start
You can git init an empty folder to start a brand new project, or run it inside an existing project to start tracking files that already exist. Git will NOT modify any of your existing files — it only adds the .git directory.
Commands
What does git init create?