TechOps Examples
Hey — It's Govardhana MK 👋
Welcome to another technical edition.
Every Tuesday – You’ll receive a free edition with a byte-size use case, remote job opportunities, top news, tools, and articles.
Every Thursday and Saturday – You’ll receive a special edition with a deep dive use case, remote job opportunities and articles.
Top engineers at Anthropic and OpenAI say AI now writes 100% of their code.
If you're not using AI, you're spending 40 hours doing what they do in 4.
These 100+ Claude Code hacks fix that and help you ship 10x faster.
Sign up for The Code and get:
100+ Claude Code hacks used by top engineers — free
The Code newsletter — learn the latest AI tools, tips, and skills to code faster with AI in 5 minutes a day
🛠 TOOL OF THE DAY
terraform module releaser - GitHub Action to automate versioning, releases, and documentation for Terraform modules in monorepos.
🧠 USE CASE
What Is Inside the .git Folder?
We rarely look inside the .git directory, but understanding its structure can help in debugging, recovering lost work, and even optimizing Git performance.
This hidden directory keeps track of everything - commits, branches, history, and configurations, allowing Git to function efficiently.
Here I’ve broken it down into a simple and self explanatory form:

Download a high resolution pdf of this diagram here for future reference.
Let’s go beyond just listing files and dive into why they matter.
1. Objects – The Core of Git’s History
Git stores everything - commits, trees (directories), and blobs (files) as objects in .git/objects/.
These are immutable and referenced by SHA-1 hashes.
If you accidentally delete a branch, Git might still have its commits in
objects/. Runninggit fsck --lost-foundcan help recover them.Git optimizes storage using packfiles (
pack-xxxx.pack) to compress and store multiple objects efficiently. Large repos rely on this for performance.
2. Refs – The Named Pointers to Your Work
The .git/refs/ folder keeps track of branches, tags, and remote repositories.
refs/heads/mainholds the latest commit hash of themainbranch.refs/tags/v1.0points to a specific commit for a tagged release.refs/remotes/origin/mainhelps Git know what themainbranch looked like on the remote last time you fetched.
Deleting a branch only removes its reference from refs/heads/, but the commits might still exist in objects/ until garbage collection runs.
3. Logs – Your Hidden Undo Button
The .git/logs/ directory maintains a history of HEAD movements. Every checkout, commit, and rebase updates these logs.
Lost a commit? Run
git reflogto find the last known SHA and recover it withgit reset --hard <SHA>.These logs are temporary and will be deleted when Git runs garbage collection (
git gc).
4. Config – Tuning Git for Performance and Security
The .git/config file controls repository settings, including remotes, aliases, and hooks.
If your remote origin URL is incorrect, fix it with
git remote set-url origin <new-url>.Want faster fetch operations? Enable
git config core.sparseCheckout trueto fetch only specific folders.
5. Index and Staging Area – Where Changes Live Before Commit
The .git/index file is the staging area. When you run git add, changes go here before being committed.
If a commit is missing expected changes, check if they were staged with
git diff --cached.Running
git resetmodifies the index without touching working files.
If you’ve never explored .git/ before, try running ls -lah .git and start experimenting with git cat-file -p to inspect objects directly.
You might just uncover something that changes the way you use Git forever.
I run a DevOps and Cloud consulting agency and have helped 17+ businesses, including Stanford, Hearst Corporation, CloudTruth, and more.
When your business needs my services, book a free 1:1 business consultation.
You may even like:
Looking to promote your company, product, service, or event to 40,000+ Cloud Native Professionals? Let's work together.


