Tsallaka zuwa abun ciki
Justice Tech School

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/HEAD

Result

HEAD
config
objects
refs
ref: refs/heads/main

Exercise

Where does Git keep history?

The  folder

Quiz Test

What file says which branch is checked out?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.