<?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[Ujjwal's Blogs]]></title><description><![CDATA[Ujjwal's Blogs]]></description><link>https://blogs.ujjwaltamrakar.in</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 11:32:56 GMT</lastBuildDate><atom:link href="https://blogs.ujjwaltamrakar.in/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[Introduction
Git is a widely used version control system. Git remembers what changed, when it changed, and who changed it.
It was created in 2005 by Linus Torvalds, the creator of the Linux kernel.
Lets understand what is git and why is it necessary ...]]></description><link>https://blogs.ujjwaltamrakar.in/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://blogs.ujjwaltamrakar.in/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Ujjwal Tamrakar]]></dc:creator><pubDate>Mon, 26 Jan 2026 14:40:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769435597344/3dc0834b-54b7-454c-80ce-0deb944aab5c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>Git is a widely used version control system. Git remembers <strong>what changed</strong>, <strong>when it changed</strong>, and <strong>who changed it</strong>.</p>
<p>It was created in 2005 by <strong>Linus Torvalds</strong>, the creator of the Linux kernel.</p>
<p>Lets understand what is git and why is it necessary in modern development</p>
<hr />
<h2 id="heading-what-is-git">What is git?</h2>
<p>Git is a <strong>tool that helps us track changes in our code</strong>, collaborate with others, and safely experiment without fear of breaking things.</p>
<h2 id="heading-why-git-is-used">Why Git is Used</h2>
<p>Git is used to solve pendrive problem. Instead of storing our code in zips or pendrive we can use git and push our code to remote server. That remote server is treated as single source of truth. Each developer works on the codebase and pushes the changes to remote server so other developers can pull the changes.</p>
<p>This makes easier for developers to collaborate in a project and merging the changes of different developers becomes easy as well.</p>
<h2 id="heading-git-basics">Git Basics</h2>
<p>For using git we just have to initialize a repository. In the root of our project we just use <strong>git init</strong> command , it initializes the repository and starts tracking changes in our code. Git detects the changes but does not save them automatically.</p>
<p>Git uses two-step commit process , first we have to add the changes to <strong>staging area</strong> using git add &lt;filename&gt; command and then commit it using <strong>git commit -m “message“</strong> command. Now our changes are saved.</p>
<h2 id="heading-core-terminologies">Core Terminologies</h2>
<ul>
<li><p><strong>Repository:</strong> A repositpry is a folder where Git tracks your project.</p>
</li>
<li><p><strong>Staging Area:</strong> A temporary area where selected changes are prepared for commit</p>
</li>
<li><p><strong>commit:</strong> A snapshot of staged changes saved permanently in the repository.</p>
</li>
<li><p><strong>Remote:</strong> A version of your repository stored online.</p>
</li>
<li><p><strong>Branch:</strong> An independent line of development used to work on features or fixes.</p>
</li>
<li><p><strong>Head:</strong> A pointer that indicates your current branch and latest commit.</p>
</li>
</ul>
<h2 id="heading-common-git-commands">Common Git Commands</h2>
<ul>
<li><p>git init - Used to initialize a git repository.</p>
</li>
<li><p>git status - Shows the current status of files (modified, staged, untracked).</p>
</li>
<li><p>git log - Displays the commit history of the repository.</p>
</li>
<li><p>git add &lt;filename&gt; - Add a file to staging area.</p>
</li>
<li><p>git add . - Add all files in to staging area.</p>
</li>
<li><p>git commit -m ‘‘message’’ - Saves staged changes as a new commit with a message.</p>
</li>
<li><p>git diff - Shows changes between files, commits, or staging states.</p>
</li>
<li><p>git remote -v - Shows remote repository URLs linked to the project.</p>
</li>
<li><p>git remote add origin &lt;url&gt; - Connects a local repository to a remote server.</p>
</li>
<li><p>git push origin &lt;branch&gt; - Uploads local commits to remote server.</p>
</li>
<li><p>git pull origin &lt;branch&gt; - Pulls latest code from remote server.</p>
</li>
</ul>
<hr />
<h2 id="heading-conclusion">Conclusion</h2>
<p>Git is a tool that every developer must learn as it makes collaborating and maintaining the code much easier.</p>
]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists: The Pendrive Problem]]></title><description><![CDATA[Introduction
Before version control system existed sharing and collaboration between developers was a disaster.
We used to share the code using zips and pendrives. This was quite difficult but when there were two or more developers working on the cod...]]></description><link>https://blogs.ujjwaltamrakar.in/why-version-control-exists-the-pendrive-problem</link><guid isPermaLink="true">https://blogs.ujjwaltamrakar.in/why-version-control-exists-the-pendrive-problem</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Ujjwal Tamrakar]]></dc:creator><pubDate>Mon, 26 Jan 2026 13:00:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769432341662/f384cc5a-e819-4571-8533-76213cb97383.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>Before version control system existed sharing and collaboration between developers was a disaster.</p>
<p>We used to share the code using zips and pendrives. This was quite difficult but when there were two or more developers working on the code , it would become disaster.</p>
<p>Lets go deeper in this <strong>Pendrive Problem</strong> and its solution</p>
<hr />
<h2 id="heading-the-problem">The Problem</h2>
<p>Lets say there is a developer A who is working on a app. Now he has to collaborate with another developer B and they work on same project at same time. They create a zip named app-working.zip and start working on the app.</p>
<p>Now developer A completes feature A and developer B completes feature B and both of them have very different codes. Merging the code has become disaster they use tools like difference checker and it took both of them a lot of time to merge their code.</p>
<p>Now this was only for 2 developer but usually more developers work on same project and share the code using zip or pendrive. This leads to :</p>
<pre><code class="lang-bash">code_final.zip

code_working.zip

code_fully_final.zip
</code></pre>
<p>Many versions of the code starts existing and it is hard to maintain a single source of truth.</p>
<hr />
<h2 id="heading-the-solution">The Solution</h2>
<p>To solve these problems, <strong>Version Control System</strong> like git was created.</p>
<p>Using version control systems we can track all changes/versions of our code. So instead of creating different zips, we can track changes in our code using version control systems and merge the code without any issues.</p>
<hr />
<h2 id="heading-conclusion">Conclusion</h2>
<p>The Pendrive Problem seems small, but it is much bigger issue that is <strong>lack of control over changes</strong>.</p>
<p>Version control systems exist because humans collaborate, make mistakes, and need structure.<br />It turns messy file-sharing into a clean, reliable workflow.</p>
]]></content:encoded></item></channel></rss>