git init

Initializing the BookNest Repository

git init creates .git/ and touches none of your files. Run it inside booknest, and create .gitattributes first, as Line Endings advised:

Creating BookNest's repositoryShell
git init
printf '* text=auto eol=lf\n*.png binary\n*.jpg binary\n' > .gitattributes
git status
Output
Initialized empty Git repository in /home/dev/v5-ch2/booknest/.git/
On branch main
No commits yet
Untracked files:
...
        docker-compose.yml
        node_modules/
...
nothing added to commit but untracked files present (use "git add" to track)

The branch is main thanks to init.defaultBranch (First-Time Setup). "No commits yet" means HEAD points to refs/heads/main, a ref the first commit will create. Untracked directories appear as one line each, including node_modules/, the next thing to fix.

Never run git init in your home directory by mistake; if you do, deleting the stray ~/.git removes only Git 1,932 's data, not your files.