<?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[My Git Blogs]]></title><description><![CDATA[My Git Blogs]]></description><link>https://my-git-blogs-aarav.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>My Git Blogs</title><link>https://my-git-blogs-aarav.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 09:41:09 GMT</lastBuildDate><atom:link href="https://my-git-blogs-aarav.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[What is Git?
Git is a DVCS (Distributed Version Control System) that helps you manage different versions of a software being developed. It is easy to use when you know about it, it really helps in man]]></description><link>https://my-git-blogs-aarav.hashnode.dev/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://my-git-blogs-aarav.hashnode.dev/git-for-beginners-basics-and-essential-commands</guid><dc:creator><![CDATA[Aarav Ahuja]]></dc:creator><pubDate>Tue, 14 Apr 2026 06:12:03 GMT</pubDate><content:encoded><![CDATA[<h3><strong>What is Git?</strong></h3>
<p>Git is a DVCS (Distributed Version Control System) that helps you manage different versions of a software being developed. It is easy to use when you know about it, it really helps in managing different versions of a software and revert to versions when required.</p>
<h3><strong>Why Git is used?</strong></h3>
<p>Git is used to manage different versions of a software, helps multiple users to code at the same time, make different branches like “main” for stable code and make another branch for a new feature named “new-feature” or something and their you can experiment with all your new ideas, after your experiment is done and you like it you can merge the two branches “main” and “new-feature” into one, and talking about versions of a software we can also revert one version of a software to previous version of the software if required.</p>
<h3><strong>Git Basics and Core Terminologies</strong></h3>
<p>The basic 4 Pillars of Git are :-</p>
<ol>
<li><p>Initialize a git repo in the project, modify the files in current directory.</p>
</li>
<li><p>Stage all the changes using “git add” command for the next step “commit”.</p>
</li>
<li><p>Commit all the changes using “git commit -m “[message]”.</p>
</li>
<li><p>Push all the changes to remote repository from local repository for enhanced sharing.</p>
</li>
</ol>
<p>The core terminologies of git are :-</p>
<ol>
<li><p>Repository: A repository (repo) is a folder containing all the important files for the project, there are two types of repositories :-</p>
<ul>
<li><p>Local Repository</p>
</li>
<li><p>Remote Repository</p>
</li>
</ul>
</li>
<li><p>Commit: A commit is like a snapshot of your code and a specific time. Each commit has its own SHA-1 HASH for its uniqueness.</p>
</li>
<li><p>Branch: Branches are two codebases in a single repo. It works like one repo is “main” where the latest and most sustainable is and on the other hand is a secondary branch named like secondary or something where you experiment with new features without touch the main branch.</p>
</li>
<li><p>Staging area: staging area is where files wait before commit</p>
</li>
<li><p>HEAD: HEAD is a pointer to current branch or commit where you are currently working.</p>
</li>
</ol>
<h3><strong>Common Git Commands</strong></h3>
<table>
<thead>
<tr>
<th><strong>Command</strong></th>
<th><strong>Use</strong></th>
</tr>
</thead>
<tbody><tr>
<td>git init</td>
<td>It initializes a new git repository in local folder.</td>
</tr>
<tr>
<td>git clone [url]</td>
<td>It copies a remote repository in a local repository.</td>
</tr>
<tr>
<td>git status</td>
<td>It tells which files are modifies, staged or untracked.</td>
</tr>
<tr>
<td>git add [file]</td>
<td>It moves unsaved changes into staging area for commiting it.</td>
</tr>
<tr>
<td>git commit -m “[message]”</td>
<td>It commits the changes in the staging area to local history.</td>
</tr>
<tr>
<td>git push</td>
<td>It uploads all the commits of local file into remote repository.</td>
</tr>
<tr>
<td>git pull</td>
<td>It fetches changes from a remote repository and merges them into your current local branch.</td>
</tr>
<tr>
<td>git branch</td>
<td>It lists all branches and helps creating or deleting branches.</td>
</tr>
<tr>
<td>git checkout [branch name]</td>
<td>It changes between multiple branches.</td>
</tr>
<tr>
<td>git merge [branch name]</td>
<td>It merges one branch into another branch.</td>
</tr>
<tr>
<td>git log</td>
<td>It is used to view the history of committed changes in a git repository.</td>
</tr>
</tbody></table>
]]></content:encoded></item><item><title><![CDATA[How Git Internally Works: A simple guide]]></title><description><![CDATA[**
How Git Works Internally**
Git works by storing files as blobs (content with hashes), directories as trees (listing files), and snapshots as commits (with history links), all in .git/objects. Branc]]></description><link>https://my-git-blogs-aarav.hashnode.dev/how-git-internally-works-a-simple-guide</link><guid isPermaLink="true">https://my-git-blogs-aarav.hashnode.dev/how-git-internally-works-a-simple-guide</guid><dc:creator><![CDATA[Aarav Ahuja]]></dc:creator><pubDate>Tue, 14 Apr 2026 06:03:05 GMT</pubDate><content:encoded><![CDATA[<h3>**</h3>
<p>How Git Works Internally**</p>
<p>Git works by storing files as <strong>blobs</strong> (content with hashes), directories as <strong>trees</strong> (listing files), and snapshots as <strong>commits</strong> (with history links), all in <code>.git/objects</code>. Branches are refs pointing to commits, the index stages changes into trees, and everything is immutable with content-based names for safety and efficiency.</p>
<h3><strong>Understanding the</strong> <code>.git</code> <strong>folder</strong></h3>
<p>The <code>.git</code> is the folder where git stores all the information about the git <strong>repository</strong>: <strong>“objects”</strong> folder saves files (blobs), folders (trees), and versions or <strong>commits</strong> by their hash; <strong>“refs”</strong> folder points branches or tags to versions; <strong>HEAD</strong> shows where you are; <strong>index</strong> holds staged files; <strong>config</strong> sets options; <strong>“logs”</strong> folder tracks moves; <strong>“hooks”</strong> folder runs scripts. We should <strong>never delete or edit it manually</strong>, as it can ruin the whole project.</p>
<h3><strong>Git Objects: Blob, Tree, Commit</strong></h3>
<p>Git objects are simple: <strong>blobs</strong> hold contents of the files, <strong>trees</strong> show structure of the folder, and <strong>commits</strong> save a full project picture with history details.</p>
<p><strong>Blobs</strong>: Raw file data only—no names. Hash = unique ID. Same content = same blob.</p>
<p><strong>Trees</strong>: Like a folder list: file names, types, and their blob/tree hashes.</p>
<p><strong>Commits</strong>: Point to root tree + parents + who/when/message. Snapshots, not changes.</p>
<h3><strong>How Git Tracks Changes</strong></h3>
<p>Git tracks changes simply by taking full <strong>snapshots</strong> of your entire project with every commit, instead of just the edits. Each snapshot is a complete picture of all files at that moment, stored nicely through shared hashes. When you ask for differences—like with <code>git diff</code> or <code>git log -p</code>—Git smartly compares these snapshots to show what changed between them. The process flows through your working files, staging with <code>git add</code> (which prepares the snapshot pieces), and committing to save it permanently.</p>
]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists: The Pendrive Problem]]></title><description><![CDATA[Why Version Control Exists
Version control system (VCS) is used to track changes in your code and code files systematically. It helps in making different versions of a program. It can also revert to p]]></description><link>https://my-git-blogs-aarav.hashnode.dev/why-version-control-exists-the-pendrive-problem</link><guid isPermaLink="true">https://my-git-blogs-aarav.hashnode.dev/why-version-control-exists-the-pendrive-problem</guid><dc:creator><![CDATA[Aarav Ahuja]]></dc:creator><pubDate>Tue, 14 Apr 2026 06:00:35 GMT</pubDate><content:encoded><![CDATA[<h3><strong>Why Version Control Exists</strong></h3>
<p>Version control system (VCS) is used to track changes in your code and code files systematically. It helps in making different versions of a program. It can also revert to previous versions of a software, if there was a flaw in the current or some other version of the software.</p>
<h3><strong>The Pendrive Analogy in Software Development</strong></h3>
<p>Before version control systems, developers used USB drives or pendrives to collaborate. They shared one common USB drive with all the project files. Only one coder could code at a time.</p>
<p>If another coder changed something in his copy of the code, everything went out of sync. It could make a total mess.</p>
<p>They made folders named "final", "final_v2", "latest final", etc to make different versions of a software. This included manual folder making and extra work for just making different versions of a software.</p>
<p>These problems were faced by millions of coders. They couldn't collaborate and code at the same time. They couldn't make different versions of a software. Instead they had to make different folders for different versions.</p>
<h3><strong>Problems Faced Before Version Control Systems</strong></h3>
<p>These were the problems faced before version control systems:</p>
<ol>
<li><p><strong>Accidental Overwrites</strong>: When multiple people edited the same file, one developer could easily overwrite another's changes without noticing.</p>
</li>
<li><p><strong>Version Chaos</strong>: Without VCS, developers couldn't make different versions of a software without making folders like "final_v2", "latest_final", etc.</p>
</li>
<li><p><strong>No Change History</strong>: It was somewhat impossible to track who made specific change, what was the time when they were made, or why, making it difficult to identify bugs.</p>
</li>
<li><p><strong>Difficulty Undoing Changes</strong>: When there was no version control systems reverting to previous version of a software was a nightmare.</p>
</li>
<li><p><strong>Collaboration Inefficiency</strong>: When developers wanted to collaborate they had to make some different folders and sometimes share a USB drives and imagine the USB drives as the single source of truth. If any other coder (which doesn't have the USB drives) made changes in his copy of the project everyone goes out of sync and it can make a huge mess.</p>
</li>
<li><p><strong>High Risk of Data Loss</strong>: If a single computer or shared drive crashes, the entire project and its history could be lost forever. If one of the shared drives like USB drives, etc. crashes it can cause a whole data loss.</p>
</li>
<li><p><strong>Fear of Experimentation</strong>: Without git, which includes branching, early developers had the fear of experimentation because a bug can cause whole project to crash.</p>
</li>
<li><p><strong>Complicated Deployment</strong>: Without a clear "main" branch, identifying which specific set of files was ready for production and can be launched without any manual work which was difficult.</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>