<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[GitFolder]]></title><description><![CDATA[GitFolder]]></description><link>https://indrajeetgit.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 18:34:57 GMT</lastBuildDate><atom:link href="https://indrajeetgit.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Inside Git: How it Works and the role of .git Folder]]></title><description><![CDATA[How Git Work Internally
Git work like saving system for code. It save code again and again. Git not save only file but save whole project state. Every time we save Git make new copy. Old copy never delete. This help go back anytime.
Code → Save → Sav...]]></description><link>https://indrajeetgit.hashnode.dev/inside-git-how-it-works-and-the-role-of-git-folder</link><guid isPermaLink="true">https://indrajeetgit.hashnode.dev/inside-git-how-it-works-and-the-role-of-git-folder</guid><dc:creator><![CDATA[Indrajeet Jha]]></dc:creator><pubDate>Sat, 31 Jan 2026 17:35:37 GMT</pubDate><content:encoded><![CDATA[<p>How Git Work Internally</p>
<p>Git work like saving system for code. It save code again and again. Git not save only file but save whole project state. Every time we save Git make new copy. Old copy never delete. This help go back anytime.</p>
<p>Code → Save → Save → History</p>
<p>What is the .git Folder</p>
<p>.git folder is very important. Git keep all brain inside it. When we do git init this folder come. Inside .git Git keep data about code. If .git delete Git stop working. We should never change this folder.</p>
<p>Project → .git → Git Data</p>
<p>Inside the .git Folder Inside .git many things are there. Objects folder store code data. Head tell which branch is active. Refs store branch names. Config store setting. All magic happen here.</p>
<p>.git → objects → refs → HEAD → config</p>
<p>What are Git Objects</p>
<p>Git save data in objects. Git only understand objects. There are three main objects blob tree commit. These objects connect with each other. Git use this to track project.</p>
<p>Blob → Tree → Commit</p>
<p>Blob Object Explained</p>
<p>Blob store file content only. It not know file name. It not know folder. It only know data inside file. Same data mean same blob. This save memory.</p>
<p>File Data → Blob</p>
<p>Tree Object Explained Tree object store folder info. It connect file name to blob. It also connect folder to other tree. Tree show project structure.</p>
<p>Folder → Tree → Files Commit Object</p>
<p>Explained</p>
<p>Commit object is final thing. Commit point to tree. Commit also point to old commit. Commit have message and time. This make history. Commit → Tree → Old Commit</p>
<p>How Git Track Changes</p>
<p>Git not change old file. When file change Git make new blob. New tree created. New commit created. Old data still there. Git never forget.</p>
<p>Old Data → New Data → New Commit</p>
<p>What Happen in git add</p>
<p>git add mean prepare file. When we do git add Git create blob. Blob go inside .git folder. File now ready to save.</p>
<p>File → git add → Blob What Happen in git commit</p>
<p>git commit mean save work. Git create commit object. It link commit to tree. Tree link to blobs. Commit stay forever. Blobs → Tree → Commit</p>
<p>How Git Use Hash</p>
<p>Git use hash to name data. Hash is long number and letter. Same file same hash. Change file change hash. This keep data safe.</p>
<p>Data → Hash → Stored Why Learn Git Internals If we know Git inside working we not fear Git. We understand why command work. We not blindly type command. This make us better developer.</p>
<p>Understanding → Confidence → Growth Simple Git Mental Model</p>
<p>Think Git like box of objects. Files become blobs. Folders become trees. Commits connect all. Git just manage objects.</p>
<p>Files → Blobs → Trees → Commits</p>
]]></content:encoded></item></channel></rss>