<?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[nikhilnandanwar]]></title><description><![CDATA[nikhilnandanwar]]></description><link>https://blogs.nikhilnandanwar.me</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 18:05:21 GMT</lastBuildDate><atom:link href="https://blogs.nikhilnandanwar.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How Does Git Store Commits and Track Changes?]]></title><description><![CDATA[Git is an open-source version control software system that is widely used across the software development industry for tracking changes in source code during software development. It is highly valued for its ability to manage both linear and non-line...]]></description><link>https://blogs.nikhilnandanwar.me/how-does-git-store-commits-and-track-changes</link><guid isPermaLink="true">https://blogs.nikhilnandanwar.me/how-does-git-store-commits-and-track-changes</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Developer]]></category><category><![CDATA[development]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[version control]]></category><category><![CDATA[technology]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Nikhil Nandanwar]]></dc:creator><pubDate>Sat, 17 Jan 2026 12:28:25 GMT</pubDate><content:encoded><![CDATA[<p>Git is an open-source version control software system that is widely used across the software development industry for tracking changes in source code during software development. It is highly valued for its ability to manage both linear and non-linear workflows, allowing developers to track the entire history of a project from its inception. This capability enables teams to collaborate more effectively by providing a comprehensive record of changes, facilitating the merging of different branches, and resolving conflicts that may arise during development. As a result, Git has become an essential tool for most software development companies, helping them maintain organized and efficient workflows while ensuring that all team members are aligned and working with the most up-to-date version of the project.</p>
<p>Whenever a <code>git init</code> command is executed in project git repository initialized with in that project structure. A empty and hidden <code>.git</code> folder created inside the current project directory which is responsible for tracking the project changes.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768629900206/4372cd03-9893-4d3f-bca7-f35f596faa59.png" alt class="image--center mx-auto" /></p>
<p>Inside of <code>.git</code> hidden directory there exists a directory called <code>branches</code>, <code>hooks</code>, <code>info</code>, <code>objects</code> and <code>refs</code> and files named <code>config</code>, <code>description</code>, <code>FETCH_HEAD</code> and <code>HEAD</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768632111294/75f78a73-10ae-4d1d-b1e1-60d84849e8fa.png" alt class="image--center mx-auto" /></p>
<p>Just after executing the <code>git init</code> command all the all the files and folder in the project directory marked as <strong>U</strong> indicating all the content within the project directory is can be tracked by the git version control software.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768631112288/3195edac-ec95-4365-ac29-65a2ac83e0a0.png" alt class="image--center mx-auto" /></p>
<p>But, the <strong>U</strong> sign is for <strong>untracked</strong>. This is a feature of git, it doesn’t track all the files by itself. We have to specifically tell git to track that file or folder. For that the <code>git add</code> command get in work, it adds the specified file with <code>git add</code> to the tracking.<br /><strong><em>Example:</em></strong></p>
<ul>
<li><p>On running <code>git add index.js</code> the <strong>U</strong> sign in front of <code>index.js</code> is now becomes <strong>A</strong> indicating the file <code>index.js</code> is now added.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768633492760/4b009d3d-dc5f-4c2a-8805-5bad5f5389ca.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Whereas inside the <code>.git</code> hidden directory a new file named <code>index</code> created containing data not readable by human. It is like a staging area, where all files are tracked before committing, helping developers to efficiently track changes.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768633774712/b0e3f935-3c47-41bf-b8c7-71492b75da03.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<p>To save changes to the Git folder permanently, you need to use <code>git commit</code>. This command captures the current state of files that you've added to the staging area with <code>git add</code>. When you run <code>git commit</code>, Git saves the changes in the repository's history and creates a new commit with a unique ID. This ID helps you track the changes made at that time. You can also add a commit message to explain the changes, which is useful for understanding the commit later. For example, you might use <code>git commit -m "Added new feature to index.js"</code> to save the changes with a descriptive message. This step is important for keeping a detailed history of your project's development, allowing you to revisit or undo changes if needed.</p>
<ul>
<li><p>The unique ID is now store in a heads directory inside a refs which indicating the HEAD of current project flow.</p>
</li>
<li><p>The commit details is written in a <code>master</code> directory of a logs directory having details like commit message, date and time, unique ID, name and email of developer committed.</p>
</li>
<li><p>An additional file is created in a <code>.git</code>'s root directory named <code>COMMIT_EDITMSG</code> storing the message passed during the commit.</p>
</li>
</ul>
<p>This are all the internal process occurs inside the .git directory whenever a changes are staged and committed using git. It also tracks all the branches made in a project progressing in parallel.</p>
]]></content:encoded></item><item><title><![CDATA[Git Command Guide: 10 Must-Know Tips for Developers]]></title><description><![CDATA[Git contains multiple commands which helps developers to use git efficiently in the software development process, but there are 10 simple commands that you should know as a developer. This 10 commands are the used daily by most of the developers.
1.g...]]></description><link>https://blogs.nikhilnandanwar.me/git-command-guide-10-must-know-tips-for-developers</link><guid isPermaLink="true">https://blogs.nikhilnandanwar.me/git-command-guide-10-must-know-tips-for-developers</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[github-actions]]></category><category><![CDATA[GitLab]]></category><category><![CDATA[Gitcommands]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software architecture]]></category><category><![CDATA[Developer]]></category><category><![CDATA[development]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Web3]]></category><category><![CDATA[version control]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Nikhil Nandanwar]]></dc:creator><pubDate>Thu, 08 Jan 2026 07:14:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767855502684/851318d9-ae7f-4179-bacb-602d90a7b568.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Git contains multiple commands which helps developers to use git efficiently in the software development process, but there are 10 simple commands that you should know as a developer. This 10 commands are the used daily by most of the developers.</p>
<h2 id="heading-1git-init">1.<code>git init</code></h2>
<p>It is used for initializing the git version control system for the project. After this git manages the record of each and every lines of codes changed in a project. By default there is no name for the current branch of repository, basically the branch name is depend on the git server where toy are storing your project code. Most of platforms like GitHub, GitLab, etc. uses <code>main</code> as their default branch name where as SourceForge uses <code>master</code> as default branch name.</p>
<pre><code class="lang-bash">git init
</code></pre>
<h2 id="heading-2git-add">2.<code>git add</code></h2>
<p>Git add is used to stage the changes for commit. It basically means whenever a commit happens for string the current code consider all the staged files for saving the current progress.</p>
<p><strong><em>Example:</em></strong></p>
<pre><code class="lang-bash">git add file.js  <span class="hljs-comment"># Stage a specific file</span>
git add . <span class="hljs-comment"># Stage all files changed</span>
</code></pre>
<h2 id="heading-3git-commit">3.<code>git commit</code></h2>
<p>Commit command stores/save the current changes of project such that in future if mistakenly the project is deleted or the there you found a bug in previous committed code then restoration of code can possible.</p>
<p>For best practice always commit the code with some messages using :</p>
<pre><code class="lang-bash">git commit -m “&lt;your-message&gt;”
</code></pre>
<p>This will help while looking for the commit for rolling back to a specific code version.</p>
<h2 id="heading-4git-revert">4.<code>git revert</code></h2>
<p>Revert is used to commit a history safely with removing the code of specific commit. It can also called as “safe rollback” because it safely remove the code of a specific commit and whole code flow remains as it is.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Syntax </span>
git revert &lt;commit_hash&gt;

<span class="hljs-comment">#Example </span>
git revert xyz986
</code></pre>
<h2 id="heading-5git-reset">5.<code>git reset</code></h2>
<p>Git reset moves the current project head back to a specific mentioned commit.</p>
<p>There are mainly 3 ways to reset:</p>
<pre><code class="lang-bash">git reset --soft HEAD~1   <span class="hljs-comment"># Keeps changes staged</span>
git reset --mixed HEAD~1  <span class="hljs-comment"># Keeps changes unstaged (default)</span>
git reset --hard HEAD~1   <span class="hljs-comment"># Discards changes completely</span>
</code></pre>
<p><em>NOTE: Use</em> <code>git reset</code> <em>carefully specially</em> <code>git reset --mixed</code> <em>as it can remove all the changes done till in the project. There is no way back after</em> <code>git reset --hard</code><em>.</em></p>
<h2 id="heading-6git-log">6.<code>git log</code></h2>
<p>Git log gives the all the history of commit activity done on project. It mainly shows commit hash, commit message, author name and date of commit. All the logs is in reverse chronological order.</p>
<pre><code class="lang-bash">$ git <span class="hljs-built_in">log</span> <span class="hljs-comment"># command</span>

<span class="hljs-comment"># Sample output</span>
commit 2e9fa773a7b8b21cad7923978a1e84ebb751b745 (HEAD -&gt; master) <span class="hljs-comment">#Hash</span>
Author: Nikhil Nandanwar &lt;email@email.com&gt; <span class="hljs-comment">#Author name and email</span>
Date:   Thu Jan 8 11:57:29 2026 +0530  <span class="hljs-comment"># Date and time</span>
    Add initial implementation of chat application with WebRTC functionality <span class="hljs-comment"># Commit message</span>

commit 17250d504e338e498ad0289462a8cb2d56cfc0e7
Author: Nikhil Nandanwar &lt;email@email.com&gt;
Date:   Tue Jan 6 22:38:53 2026 +0530
    Remove legacy chat application files including package.json, server.js, and style.css

commit 8fcdf3b637fe4aa8faa90e16bcf4d5d55fd08c92
Author: Nikhil Nandanwar &lt;email@email.com&gt;
Date:   Tue Jan 6 22:32:50 2026 +0530
    initial commit: add basic structure <span class="hljs-keyword">for</span> chat application with WebRTC functionality
</code></pre>
<h2 id="heading-7git-diff">7.<code>git diff</code></h2>
<p>Git diff is used to see the difference between the two files like what is actually changed in that code compared to last commit. It can be used for comparison of two files, commits or branches shows the added code with the green highlight and remove code with red highlight, helping user to see clear difference between the two.</p>
<pre><code class="lang-bash">git diff              <span class="hljs-comment"># Unstaged changes</span>
git diff --staged     <span class="hljs-comment"># Staged changes</span>
</code></pre>
<h2 id="heading-8git-status">8.<code>git status</code></h2>
<p>Git status tells the status of each files and current working directory by marking files as modified, staged, untracked, or ready to be committed.</p>
<pre><code class="lang-bash">git status
</code></pre>
<h2 id="heading-9git-branch">9.<code>git branch</code></h2>
<p>Git branch is used for creating another branch of current project flow, with having all the previously added code in it. It mainly helps for parallel working without affecting the code of other branches.</p>
<pre><code class="lang-bash">git branch <span class="hljs-comment"># List all branches</span>
git branch feature-login <span class="hljs-comment"># Create a new branch</span>
git branch -d feature-login <span class="hljs-comment"># Delete a branch</span>
</code></pre>
<h2 id="heading-10git-checkout">10.<code>git checkout</code></h2>
<p>Git checkout is mainly used for getting the code of other branches of the current project. It helps to quickly switch between two branches and check the progress of each branches or compare the two.</p>
<pre><code class="lang-bash">git checkout main            <span class="hljs-comment"># Switch branch</span>
git checkout abc123          <span class="hljs-comment"># Checkout a specific commit</span>
</code></pre>
<p>Checkout is also useful for restoring the code of a file to it’s previous version.</p>
<pre><code class="lang-bash">git checkout -- file.txt     <span class="hljs-comment"># Restore a file</span>
</code></pre>
<p>This are the 10 commands that will help you in your software development journey and I am open for your feedback or suggestions about the blog.</p>
<p>Thank you for reading the blog, this is <a target="_blank" href="https://x.com/nixhil_">Nikhil Nandanwar</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How Git Solves Common File Storage Issues]]></title><description><![CDATA[In today's rapidly evolving technological landscape, it has become increasingly apparent that every developer emphasizes the importance of learning Git. But why is mastering Git considered so crucial? To understand this, let's imagine attempting to b...]]></description><link>https://blogs.nikhilnandanwar.me/how-git-solves-common-file-storage-issues</link><guid isPermaLink="true">https://blogs.nikhilnandanwar.me/how-git-solves-common-file-storage-issues</guid><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[version control]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[development]]></category><category><![CDATA[GitLab]]></category><category><![CDATA[Gitcommands]]></category><category><![CDATA[github-actions]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Nikhil Nandanwar]]></dc:creator><pubDate>Fri, 02 Jan 2026 18:20:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767378674261/0b0e78a8-a645-4ad8-afa6-ebfbb185271a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In today's rapidly evolving technological landscape, it has become increasingly apparent that every developer emphasizes the importance of learning Git. But why is mastering Git considered so crucial? To understand this, let's imagine attempting to build software without utilizing Git or any version control system.</p>
<p>Without Git, developers would face significant challenges in managing changes to the codebase. Collaboration among team members would become largely difficult, as there would be no efficient way to track who made specific changes or to merge contributions from different developers seamlessly. This could lead to conflicts and errors, as multiple versions of the code might exist without a clear way to reconcile them.</p>
<p>Moreover, without a version control system like Git, reverting to previous versions of the code in case of errors or bugs would be difficult or impossible. Developers would have to manually keep track of changes, which is not only time-consuming but also prone to human error. This could result in lost work and decreased productivity.</p>
<p>Git also provides a robust framework for branching and merging, allowing developers to experiment with new features or fixes in isolated environments without affecting the main codebase. This capability encourages innovation and reduces the risk of introducing bugs into the production environment.</p>
<h3 id="heading-creating-software-without-git">Creating Software Without Git</h3>
<p>In a company, there are often numerous developers collaborating on the same project. Without Git, they might have no better choice than using physical storage devices like USB drives to store and share the project's code. While USB drives are portable and can transfer data quickly, this method introduces several challenges. Each developer would need to manually copy the latest version of the code onto their drive, which could lead to inconsistencies if someone forgets to update their version (like <code>final</code>, <code>final_v2</code>, <code>latest_final</code>). Additionally, coordinating changes becomes difficult, as developers must ensure they are not overwriting each other's work. This process is not only time-consuming but also increases the likelihood of errors, such as accidentally losing important code changes or creating conflicting versions. Overall, relying solely on USB drives for code sharing in a multi-developer environment can significantly hinder productivity and collaboration.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767033692423/e5e35f42-2243-46e2-abe6-ddb1d6671046.png" alt class="image--center mx-auto" /></p>
<p>So, imagine a scenario where <strong>Dev1</strong> creates a new feature and saves it onto a USB drive as a version named <code>final_v1</code>. Then, <strong>Dev1</strong> hands the USB drive to <strong>Dev2</strong>, who makes changes and adds another feature to the same drive as <code>final_v2</code>. This process continues as the USB drive is passed along to the next developer who needs to add their code. Each developer must wait their turn to access the USB drive, which can slow down the entire development process.</p>
<p>There's also a scenario where all developers are working on the same feature and they make changes in almost the same files. So, when combining the entire project code implementations of all the developers, there is a chance of overriding code or undetectable merge conflicts, which can cause unusual behavior of the project software or an outage, which can cost the company.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767033365465/fbe3a8f3-d177-4fc9-9750-f7cff7b16b41.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-how-git-solves-the-problems">How Git solves the problems?</h3>
<p>Git is a version control system which keeps tract of all the changes occurred in software from the beginning of project with the customization messages given by the developing team for marking the type of work done till. Git is developed by <a target="_blank" href="https://x.com/Linus__Torvalds">@Linus__Torvalds</a> as side project for managing and keeping track of the Linux codebase.</p>
<p>Git is designed to efficiently track every single line of code that is changed across different branches of a project. Unlike traditional methods that might require duplicating the entire codebase, Git manages to do this without creating multiple copies of the code. This approach makes Git both lightweight and fast, allowing it to keep a detailed history of changes without consuming excessive storage space. Each change is recorded with precision, enabling developers to easily review, compare, and manage the evolution of their files over time. This capability is crucial for maintaining an organized and efficient workflow, especially in collaborative environments where multiple developers are working on different parts of the project simultaneously.</p>
<h3 id="heading-short-comparison">Short Comparison</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767376531048/ba002cd2-13da-489b-982e-451ef94a2a25.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item></channel></rss>