Inside the .git Folder
Git stores everything in the hidden .git folder: HEAD points at the current branch, objects holds the data, refs holds branch and tag names and config holds settings. Delete .git and the history is gone.
Example
ls .git | grep -E '^(HEAD|config|objects|refs)$'
cat .git/HEADResult
HEAD config objects refs ref: refs/heads/main
Exercise
Where does Git keep history?
The folder
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.