<?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[Git-Essential commands to learn]]></title><description><![CDATA[Git-Essential commands to learn]]></description><link>https://git-essential-commands-to-learn.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 05 Oct 2026 07:34:44 GMT</lastBuildDate><atom:link href="https://git-essential-commands-to-learn.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Emmet for HTML]]></title><description><![CDATA[What is Emmet?
Emmet is like a shorthand language for web developers. It’s like a texting slang for code(like in daily life we write no. = number , avg =average , etc =Et cetera ) . Instead of typing ]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/emmet-for-html</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/emmet-for-html</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Tue, 24 Feb 2026 15:25:24 GMT</pubDate><content:encoded><![CDATA[<h2>What is Emmet?</h2>
<p><strong>Emmet</strong> is like a shorthand language for web developers. It’s like a texting slang for code(like in daily life we write no. = number , avg =average , etc =Et cetera ) . Instead of typing out every single bracket and tag, we type a tiny snippet, and then we hit the <strong>" Tab "</strong> key , and it "explodes" into a full valid HTML.Emmet is a plugin built into almost every modern code editor (like VS Code) that lets us type short abbreviations and transform them into full blocks of code instantly.</p>
<h2>The Manual Way (Without Emmet)</h2>
<p>If we wanted to create a simple list menu with five items, our hands would have to do a lot of repetitive heavy lifting. We would have to type every bit of it manually like:</p>
<ol>
<li><p>Type <code>&lt;ul&gt;</code> and hit enter.</p>
</li>
<li><p>Type <code>&lt;li&gt;first item&lt;/li&gt;</code> .</p>
</li>
<li><p>Then we would copy paste the line number-2 , four more times and change the content inside the tag to second item ,third item,fourth item and fifth item.</p>
</li>
</ol>
<p>so it would take quite a time to write and then copy paste and change.Imagine we have 50 items then we have to write so many code and paste and change.</p>
<p>With Emmet, we describe the <strong>structure</strong> we want using a CSS-like syntax. To get that same items, we just type like this:</p>
<p><code>ul&gt;li*5</code> then we hit tab and our code gets created like this and we would just write the content:</p>
<pre><code class="language-plaintext">&lt;ul&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<h2>How Emmet Works Inside our Editor?</h2>
<p>We don't need to run a special program. We simply type our shorthand in an HTML file and hit the <strong>Tab</strong> or <strong>Enter</strong> key. Our editor recognizes the pattern and swaps the text out immediately.</p>
<h2>Basic Syntax &amp; Abbreviations</h2>
<h3>Creating Elements :</h3>
<p>We type the name of the tag (without brackets) and hit Tab.</p>
<ul>
<li><p><code>div</code> → <code>&lt;div&gt;&lt;/div&gt;</code></p>
</li>
<li><p><code>p</code> → <code>&lt;p&gt;&lt;/p&gt;</code></p>
</li>
<li><p><code>h1</code> → <code>&lt;h1&gt;&lt;/h1&gt;</code></p>
</li>
</ul>
<p>For Adding Classes, IDs, and Attributes</p>
<ul>
<li><p><strong>Classes (</strong><code>.</code><strong>) :</strong> <code>div.box</code> → <code>&lt;div class="box"&gt;&lt;/div&gt;</code></p>
</li>
<li><p><strong>IDs (</strong><code>#</code><strong>):</strong> <code>h1#main-title</code> → <code>&lt;h1 id="main-title"&gt;&lt;/h1&gt;</code></p>
</li>
<li><p><strong>Attributes (</strong><code>[]</code><strong>):</strong> <code>img[src="demo1.png"]</code> → <code>&lt;img src="demo1.png" alt=""&gt;</code></p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/69821ff00f89ae94fd533b40/73c367fc-a178-4e57-b936-782676e57fc9.png" alt="" style="display:block;margin:0 auto" />

<h3>Nesting Elements (<code>&gt;</code>)</h3>
<p>The "greater than" symbol tells emmet to put the next element inside the previous element.</p>
<p><code>div&gt;p&gt;span</code></p>
<pre><code class="language-plaintext">&lt;div&gt;
    &lt;p&gt;
        &lt;span&gt;&lt;/span&gt;
    &lt;/p&gt;
&lt;/div&gt;
</code></pre>
<p>Example Image:</p>
<img src="https://cdn.hashnode.com/uploads/covers/69821ff00f89ae94fd533b40/341c5a27-1ecb-46ef-b467-13f2f5e8ce19.png" alt="" style="display:block;margin:0 auto" />

<h3>Multiplication (<code>*</code>)</h3>
<p>If we need a list.we don't type <code>&lt;li&gt;</code> five times. we can use multiply .</p>
<p><code>ul&gt;li*3</code></p>
<pre><code class="language-plaintext">&lt;ul&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/69821ff00f89ae94fd533b40/436842c6-a523-44b9-87a9-c6bef27bd99b.png" alt="" style="display:block;margin:0 auto" />

<h3>Instant HTML boilerplate :</h3>
<p>Every HTML file in a project needs a standard head, body, and meta tags to work that makes the stcructure of the webpage. Instead of copying and pasting this from an old project, we just type an <strong>exclamation mark ( ! )</strong> and hit Tab or enter.</p>
<p><strong>Shortcut for the html boilerplate :</strong> <code>!</code></p>
<pre><code class="language-plaintext">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Document&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></content:encoded></item><item><title><![CDATA[CSS Selectors 101: Targeting Elements with Precision]]></title><description><![CDATA[What is CSS selector?
A css selector is the first part of a CSS rule. It is a pattern that tells the browser which HTML elements should be selected to have the style properties (like color, size,borde]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/css-selectors-101-targeting-elements-with-precision</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/css-selectors-101-targeting-elements-with-precision</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 17:31:17 GMT</pubDate><content:encoded><![CDATA[<h2>What is CSS selector?</h2>
<p>A css selector is the first part of a CSS rule. It is a pattern that tells the browser which HTML elements should be selected to have the style properties (like color, size,border, or margin) applied to them.</p>
<h2>Why are CSS Selectors Needed?</h2>
<p>Without selectors, CSS would be useless.Selectors allows us to control how each element style looks like . It gives use complete control of the style of each element in html.</p>
<p>It also help us to separate html from css rules which follows the separation of concern where css and html files are kept different.</p>
<p>It also follow DRY("Don't Repeat Yourself.") principle.With just one selector, we can style different pages at once. If we decide that we want our brand color to change from orange to purple, we just only have to change one line of CSS rather than editing every single HTML page.</p>
<h2>Common Types of Selectors</h2>
<h3>Element Selector</h3>
<p>It targets all HTML tags of a specific type. It is the most general way to style our site.</p>
<ul>
<li><p><strong>Syntax is</strong> <code>h1 { color:red; }</code></p>
</li>
<li><p><strong>Target:</strong> Every <code>&lt;h1&gt;</code> on the page or Every <code>&lt;p&gt;</code> on the page</p>
</li>
</ul>
<h3>Class Selector</h3>
<p>Targets elements that have a specific <code>class</code> attribute. We can use the same class on multiple elements.</p>
<ul>
<li><p><strong>Syntax</strong> ,it starts with a dot (<code>.</code>) . <code>.highlight { border:1px; } or .box{margin:20px }</code></p>
</li>
<li><p><strong>Target:</strong> Any element with <code>class="highlight" or class="box"</code>.</p>
</li>
</ul>
<h3>ID Selector</h3>
<p>Targets a single, unique element. An ID should only be used <strong>once</strong> per page.</p>
<ul>
<li><p><strong>Syntax:</strong> Starts with a hash (<code>#</code>). <code>#navbar { padding:5px }</code></p>
</li>
<li><p><strong>Target:</strong> The one element with <code>id="navbar"</code>.</p>
</li>
</ul>
<h3>Group Selectors</h3>
<p>Used to apply the same styles to multiple selectors at once to keep our code clean.</p>
<ul>
<li><p><strong>Syntax:</strong> Separated by commas. <code>h1, h2, p { color: blue; margin:10px }</code></p>
</li>
<li><p><strong>Effect:</strong> All three elements will turn blue and margin will be 10px on all sides.</p>
</li>
</ul>
<h3>Descendant Selectors</h3>
<p>Think of CSS selectors as a set of instructions that tell the browser, "Find these specific items and make them look like this."</p>
<p>Here is a breakdown of the selectors you mentioned, ranging from broad to specific.</p>
<hr />
<h3>HTML Code</h3>
<pre><code class="language-plaintext">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;CSS Selectors Demo&lt;/title&gt;
    &lt;link rel="stylesheet" href="styles.css"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Element Selector &lt;/h1&gt;
    &lt;p&gt;This is styled by element selector (p)&lt;/p&gt;
    
    &lt;p class="highlight"&gt;Class selector (.highlight)&lt;/p&gt;
    
    &lt;div id="main-content"&gt;
        &lt;h2&gt;ID Selector (#main-content)&lt;/h2&gt;
        &lt;p&gt;Content inside ID element&lt;/p&gt;
    &lt;/div&gt;
    
    &lt;h3&gt;Group Selector Demo&lt;/h3&gt;
    &lt;span class="grouped"&gt;Grouped elements&lt;/span&gt;
    
    &lt;section class="container"&gt;
        &lt;h4&gt;Descendant Selector&lt;/h4&gt;
        &lt;p&gt;Any p inside .container&lt;/p&gt;
        &lt;div&gt;
            &lt;p&gt;Nested p (also targeted)&lt;/p&gt;
        &lt;/div&gt;
    &lt;/section&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<h3>Without css the above html code looks like</h3>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/69821ff00f89ae94fd533b40/5b27753d-dc2c-4fd7-a462-2b7ab2291414.png" alt="" style="display:block;margin:0 auto" />

<p>CSS Fiile with it rules</p>
<pre><code class="language-plaintext">/* ELEMENT SELECTOR - All h1 tags have rules applied */
h1 { 
    color: navy; 
    text-align: center; 
    margin-bottom: 20px;
}

/* ELEMENT SELECTOR - All p tags have rules applied  */
p { 
    font-family: Arial, sans-serif; 
    margin: 10px 0; 
    color: #333;
    line-height: 1.5;
}

/* CLASS SELECTOR - .highlight class have rules applied */
.highlight { 
    background-color: yellow; 
    padding: 10px; 
    border-left: 5px solid orange; 
    border-radius: 4px;
}

/* ID SELECTOR - #main-content have rules applied */
#main-content { 
    background: linear-gradient(45deg, #e3f2fd, #bbdefb); 
    padding: 25px; 
    border-radius: 10px; 
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Descendant selector inside #main-content  have rules applied*/
#main-content h2 { 
    color: #1976d2; 
    font-size: 24px; 
    margin-bottom: 15px;
}

/* GROUP SELECTOR - h3 and .grouped have rules applied */
h3, .grouped { 
    color: green; 
    font-weight: bold; 
    border: 2px dashed green; 
    padding: 12px; 
    display: inline-block;
    margin: 10px 5px;
    border-radius: 5px;
}

/* DESCENDANT SELECTOR - All p inside .container have rules applied */
.container p { 
    color: darkgreen; 
    font-style: italic; 
    background: #e8f5e8; 
    padding: 15px; 
    margin: 8px 0;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
}

/* LAYOUT */
body { 
    max-width: 900px; 
    margin: 0 auto; 
    padding: 30px; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}


h4 { margin-bottom: 15px; color: #555; }
div { margin: 10px 0; }
</code></pre>
<h3>After Css Applied</h3>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/69821ff00f89ae94fd533b40/bf5eba03-96a4-4629-b8df-b1c4c2eafa23.png" alt="" style="display:block;margin:0 auto" />

<h2>Basic Selector Priority</h2>
<p>When two different rules try to style the same element in an html file, the browser follows a "hierarchy of power" called <strong>Specificity</strong>.</p>
<table style="min-width:75px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p><strong>Selector Type</strong></p></td><td><p><strong>Example</strong></p></td><td><p><strong>Specificity</strong></p></td></tr><tr><td><p><strong>Element</strong></p></td><td><p><code>p , a , div ,h1</code></p></td><td><p>Low</p></td></tr><tr><td><p><strong>Class</strong></p></td><td><p><code>.text-box , .navbar , .container</code></p></td><td><p>Medium</p></td></tr><tr><td><p><strong>ID</strong></p></td><td><p><code>#header</code></p></td><td><p>High</p></td></tr><tr><td><p><strong>Inline Style</strong></p></td><td><p><code>style="color: red;"</code></p></td><td><p>Highest</p></td></tr></tbody></table>

<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/69821ff00f89ae94fd533b40/7699ac9b-5dad-4b39-b097-1ea1e97f6dc8.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Understanding Network Devices]]></title><description><![CDATA[How Internet reaches to our devices ?
The internet reaches homes and offices through a layered network of cables, signals, and equipment(hardware device) provided by Internet Service Providers (ISPs).]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/understanding-network-devices</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/understanding-network-devices</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:58:25 GMT</pubDate><content:encoded><![CDATA[<h2><strong>How Internet reaches to our devices ?</strong></h2>
<p>The internet reaches homes and offices through a layered network of cables, signals, and equipment(hardware device) provided by Internet Service Providers (ISPs).</p>
<p>Data travels from global servers via high-speed fiber optic cables gets routed locally through neighborhood nodes, and enters our building via a wired connection like fiber, cable, or DSL, where a modem converts it for use.</p>
<h2><strong>What is a Modem ?</strong></h2>
<p>A modem is a device that converts digital data into analog signals (or vice versa) so our network can communicate over phone lines, cable, or fiber from our ISP. Without it, our devices couldn't "communicate" to the internet.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771158635709/ba811d4d-0228-46dc-aba4-3834567384f4.jpeg" alt="" style="display:block;margin:0 auto" />

<h2><strong>What is a Router ?</strong></h2>
<p>A router is a networking device that connects multiple devices, like phones,smart TVs and laptops, to the internet and directs data traffic between <a href="http://them.It">them.It</a> acts like a traffic cop for data packets, reading their destination addresses and sending them along the best path across networks. This lets our home devices share one internet connection efficiently.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771158834595/35ac3eee-2799-41df-bd74-79a06fa45f64.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>Switch vs Hub ?</strong></h2>
<p>A “ switch “ intelligently connects devices in a local network (LAN) by sending data only to the intended recipient based on MAC addresses, reducing congestion(<strong>overcrowding</strong>).</p>
<p>A “hub “ broadcasts data to all connected devices blindly, causing collisions and slowdowns—hubs are outdated.</p>
<p>Lets take an example: Office with 20 computers— a switch lets PC1's file reach only PC2 efficiently. A hub floods everyone, its like shouting announcements in a quiet room where only one person needs to hear.</p>
<h2><strong>What is a Firewall and why security lives here?</strong></h2>
<p>It acts as gatekeeper which monitors and blocks unauthorized traffic between your trusted network and untrusted ones (like the internet) using rules.</p>
<p>Example: It stops hackers scanning our home network ports, like a seccurty guard at a school checking IDs and denying sketchy strangers while letting authorised teacher/student/staff in.</p>
<p>Security lives here because firewalls inspect every packet at the network edge, preventing malware or attacks before they reach devices.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771158989661/fb7de530-7afc-49b2-a515-6b88c5e31f5c.avif" alt="" style="display:block;margin:0 auto" />

<h2><strong>What is Load Balancer ?</strong></h2>
<p>A load balancer distributes incoming traffic across multiple servers to avoid overloads, ensuring scalability for high-demand sites by checking servers and routing efficiently to intented part.</p>
<p>Example :Live Sports during peak hours ,it splits millions of streams across server farms so no single server crashes .</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771159219085/f327004b-9b39-4438-9b9c-2bc31918dcaa.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>How all these devices work together in a real-world setup?</strong></h2>
<p>For Home :</p>
<p>ISP (wire/cable) → modem (internet access) → router (traffic direction + Wi-Fi) → switch (wired extras) + firewall (built into router).</p>
<p>Data flows : Device request → router → modem → internet → back the same path.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771159748690/71d58191-0026-4325-9e8b-f0900802e45a.jpeg" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[How DNS Resolution Works]]></title><description><![CDATA[What is DNS and why name resolution exists?
DNS( Domain Name System) acts like the internet's phonebook, translating easy-to-remember names(url) like "google.com" into numerical IP addresses (like 142]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/how-dns-resolution-works</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/how-dns-resolution-works</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:56:06 GMT</pubDate><content:encoded><![CDATA[<h2><strong>What is DNS and why name resolution exists?</strong></h2>
<p>DNS( Domain Name System) acts like the internet's phonebook, translating easy-to-remember names(url) like "<a href="http://google.com/"><strong>google.com</strong></a>" into numerical IP addresses (like 142.250.190.78) that computers use to find each other online over the internet</p>
<p>Name resolution exists because we humans prefer remembering simple names then complex numbers making the web friendly while computer(network = device + wires + rules) rely on IP address for routing data</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771047532326/baa6ebde-8e0c-4559-915f-92d78c401600.jpeg" alt="" style="display:block;margin:0 auto" />

<h2><strong>DNS Resolution Layers</strong></h2>
<p>DNS resolution layers break down the process of turning a domain(human-readable address) like <a href="http://google.com/"><strong>google.com</strong></a> into an IP address across three key levels, like climbing a directory tree.</p>
<p>Root Servers:There are 13 global clusters denoted by “ . “ which act as the internet's starting index. They don't know specific IPs but refer queries to TLD servers (e.g., .com or .in or .edu etc).</p>
<p>TLD Servers :Top-Level Domain(TLD) servers handle extensions like .com, .org, or .in. They point to the domain's authoritative nameservers (NS(name server) records, e.g., <a href="http://ns1.google.com/"><strong>ns1.google.com</strong></a> for <a href="http://google.com/"><strong>google.com</strong></a>)</p>
<p>Authoritative Servers : These hold the final records (A/AAAA for IPs) for the exact domain. The resolver queries them last to get the answer, caching it for speed.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771047517084/41bb816b-366c-42f8-b1ef-2b71fc05dd58.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>What is the</strong> <code>dig</code> <strong>command and when it is used ?</strong></h2>
<p>The “dig”(Domain Information Grope) command is a powerful command line tool for querying(requesting) DNS servers to get detailed records like IP addresses, mail servers, or name servers.DNS admins and developers use it for troubleshooting DNS issues, verifying name resolution, testing specific record types (example: A, MX, NS records), or checking server responses, offering more flexibility and clearer output .</p>
<p>Example: If my site “ <code>example.com</code> ” isn't resolving? Type <code>dig example.com</code> in our terminal ,it reveals the IP (like 192.0.2.1), query time, and any errors, helping spot if our DNS provider glitched.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771048035123/f857d6c2-a371-430d-bda1-f05b32846d30.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>NS records</strong></h2>
<p>NS (Name Server) records, are simple DNS entries that list the official servers responsible for a website's or domain's details, like its IP address</p>
<p>What NS Records Do : It is like a pointer telling the internet whcih nameserver manages a domain DNS deatils such as Ip addresses , or email settings.For example, when we type "<a href="http://example.com/"><strong>example.com</strong></a>," DNS queries follow NS records to reach the right server for resolution.Without it, browsers couldn't find a site's IP address from its name.</p>
<p>NS record is Important because ,proper NS records keep domains working smoothly ,without correct NS records, no one can reach our site because the internet won't know where to look. Multiple NS records add reliability—if one server fails, others step in to prevent downtime.</p>
<h2><strong>Recursive Resolver Role</strong></h2>
<p>Behind the scenes , when we visit <a href="http://example.com/"><strong>example.com</strong></a>, our device's recursive resolver (like our ISP's DNS helper) starts at the internet's root servers, follows a chain of NS records down to the DNS hierarchy (root → .com servers → domain's NS), and asks those authoritative nameservers for the final details, like the IP address. This delegation makes the whole system fast and distributed.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771049253439/2a04e5c6-9c1f-41f2-9280-d1004da72874.png" alt="" style="display:block;margin:0 auto" />

<p>Example :When we type "<a href="http://google.com/"><strong>google.com</strong></a>" in a browser, it needs the site's IP address to connect. The <code>dig</code> <code>google.com</code> command shows the DNS steps our browser takes behind the scenes to get that.Running <code>dig</code> <code>google.com</code> produces output like this in the terminal</p>
<pre><code class="language-plaintext">

 ; &lt;&lt;&gt;&gt; DiG 9 &lt;&lt;&gt;&gt; @127.0.0.53 goggle.com A
 ; (1 server found)
 ;; global options: +cmd
 ;; Got answer:
 ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 5841
 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 65494
 ;; QUESTION SECTION:
 ;goggle.com.            IN    A

 ;; AUTHORITY SECTION:
 goggle.com.        300    IN    SOA    ns1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200 300

 ;; Query time: 32 msec
 ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
 ;; WHEN: Sat Feb 14 06:14:16 UTC 2026
 ;; MSG SIZE  rcvd: 121
</code></pre>
]]></content:encoded></item><item><title><![CDATA[A Beginner-Friendly Guide to Browser Internals]]></title><description><![CDATA[What happens after someone type a URL and press Enter ?
When we hit enter after typing the URL, the browser has an engine that grabs the url from the address bar .It first checks the memory(cache) for]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/a-beginner-friendly-guide-to-browser-internals</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/a-beginner-friendly-guide-to-browser-internals</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:54:45 GMT</pubDate><content:encoded><![CDATA[<h2><em><strong>What happens after someone type a URL and press Enter ?</strong></em></h2>
<p>When we hit enter after typing the URL, the browser has an engine that grabs the url from the address bar .It first checks the memory(cache) for a quick reply if it doesn’t found the response the browser networking layer spring into action. It is like sending a courier to a warehouse(the server) which is very far way. The courier says , ‘Hey i want the files for <a href="http://yahoo.com">yahoo.com</a>’ .The warehouse upon getting this request packs three type of boxes and send them back to the client.</p>
<ul>
<li><p>HTML: Skeleton (Blueprint)of the webpage</p>
</li>
<li><p>CSS : The paint and decorating samples</p>
</li>
<li><p>Javascript: The wiring and plumbing</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771043982933/d2941de1-903c-49b5-84f4-931b0cc9dc2d.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>Main parts of a browser :-</strong></h2>
<p>A Browser translate raw web files ( HTML ,CSS ,Javascript) into a picture that has behavior we see and click. They oragnize fetching data ,parsing it into trees ( DOM trees / CSSOM tree) ,computing layout and pianting layers.</p>
<p>Breakdown of what browser does :-</p>
<ul>
<li><p><strong>Fetching</strong>: Grabs HTML, CSS, and images from the web, like downloading ingredients for a recipe</p>
</li>
<li><p><strong>Parsing Trees</strong>: Breaks HTML into a DOM tree (page structure) and CSS into a CSSOM tree (styling rules), forming the blueprint.</p>
</li>
<li><p><strong>Layout</strong>: It figures out exact positions and sizes for every element, like arranging furniture in a room.</p>
</li>
<li><p><strong>Painting</strong>: It draws pixels onto screen layers for smooth visuals and animations.</p>
</li>
<li><p><strong>Process Isolation</strong>: Runs UI, tabs, and plugins in isolated "sandboxes" to protect our system from malicious sites</p>
</li>
</ul>
<p>Main Component :</p>
<ol>
<li><p><strong>User Interface</strong>: It includes address bar for URLs, tabs for multiple pages, back/forward buttons, bookmarks, and refresh/stop controls.</p>
</li>
<li><p><strong>Browser Engine</strong>: It is the manager. It coordinates actions between the UI and the Rendering Engine. When we click "Refresh button" the Browser Engine tells the other parts to get to work.</p>
</li>
<li><p><strong>Rendering Engine</strong>: It is the artist . Its sole job is to display the content. If we use Chrome/Edge, this is <strong>Blink</strong>; if you use Safari, it’s <strong>WebKit</strong>; for Firefox, it’s <strong>Gecko</strong>.</p>
</li>
<li><p><strong>Networking</strong>: Handles HTTP/HTTPS requests to fetch files</p>
</li>
<li><p><strong>JavaScript Engine</strong>: Executes JS code (e.g. V8 in Chrome ,<strong>SpiderMonkey</strong> in Firefox)</p>
</li>
<li><p><strong>Storage/Security</strong>: Manages cookies, cache, and sandboxing</p>
</li>
</ol>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771043238680/7484210c-bce1-4bdb-862f-f6ef5a5816f7.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>Networking: how a browser fetches HTML, CSS, JS</strong></h2>
<p>A Browser fetch HTML, CSS, and JS through a streamlined networking process starting with a URL input, resolving it via DNS, and sending HTTP requests over TCP connections.</p>
<p>Steps in the fecthing:</p>
<ul>
<li><p><strong>DNS Lookup</strong>: Converts domain (e.g., <a href="http://google.com"><strong>google.com</strong></a> , <a href="http://yahoo.com">yahoo.com</a>) to an IP address for server location</p>
</li>
<li><p><strong>TCP Handshake</strong>: Establishes a reliable,secure connection with the server .</p>
</li>
<li><p><strong>HTTP Request</strong>: Sends a GET request with headers (e.g., User-Agent, Accept) specifying HTML/CSS/JS needs; no body for GET is sent</p>
</li>
<li><p><strong>Server Response</strong>: Returns status (e.g., 200 OK), headers (Content-Type: text/html), and resource body.</p>
</li>
<li><p><strong>Resource Handling</strong>: Browser parses HTML firstly, then discovers and fetches linked CSS/JS in parallel via subsequent requests; caches for reuse.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771044459458/57d03d7d-f7cc-4ba8-989e-3d6045eb78f2.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>HTML Parsing and DOM</strong></h2>
<p>HTML is parsed token-by-token into the Document Object Model (DOM), a tree of nodes representing elements, attributes, and text.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771044216639/1b487557-4ee3-4691-84ba-94b1f6b1254d.gif" alt="" style="display:block;margin:0 auto" />

<h2><strong>CSS Parsing and CSSOM</strong></h2>
<p>CSS rules are parsed into the CSS Object Model (CSSOM), a tree of style rules matched to DOM nodes by selectors. This enables computed styles per element in the browser.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771045187859/3b83f150-3e4b-4876-8d77-0f3f709b6157.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>DOM + CSSOM Merge</strong></h2>
<p>The browser combines DOM (content) and CSSOM (styles) into a render tree, filtering invisible elements (e.g., display : none ) and including only styled, visible nodes. This render tree drives layout (positioning) and paint (pixel rendering).</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771045374708/b05fe999-fe71-468c-a381-bf60fd3d70db.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771045401614/22f3724a-5386-47e6-9607-8386d135c0ef.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[What is HTML?
HTML (HyperText Markup Language) is the skeleton of a website.It doesn’t provide the color which is provided by CSS and interactivity which Js provides to a wesbite ,HTML provides the es]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/understanding-html-tags-and-elements</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:53:18 GMT</pubDate><content:encoded><![CDATA[<h2><strong>What is HTML?</strong></h2>
<p>HTML (<strong>HyperText Markup Language</strong>) is the skeleton of a <a href="http://website.It">website.It</a> doesn’t provide the color which is provided by CSS and interactivity which Js provides to a wesbite ,HTML provides the essential structure that holds everything together.</p>
<p>The easiest way to understand HTML is the <strong>Box Analogy</strong>. Every piece of content on a website is wrapped in an invisible box.</p>
<ul>
<li><p><strong>The Opening Tag</strong> “<code>&lt;tag&gt;</code>” is like the front of the box.</p>
</li>
<li><p><strong>The Content</strong> is what we put inside the box.</p>
</li>
<li><p><strong>The Closing Tag</strong> “<code>&lt;/tag&gt;</code>“ is like the back of the box, sealing it shut.</p>
</li>
</ul>
<h2><strong>HTML tags</strong></h2>
<p>HTML tags are keywords enclosed in angle brackets “ <code>&lt;</code> “ and “ <code>&gt;</code> “ that indicate how content should be structured or displayed, forming the core of HTML syntax.</p>
<p>Opening tag: It starts with an element, e.g., “ </p><h1> “<p></p>
<p>Closing tag: It ends the element e.g., “ </p></h1> with a slash “ .<p></p>
<p>Content: It just sits/fit between opening and closing tag ( </p><h1> This is first heading content </h1> )<p></p>
<pre><code class="language-xml">&lt;h1&gt;Hi , i am inside the h1 tag &lt;/h1&gt;
</code></pre>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771005719452/2f6b8691-ae6c-4064-93bb-ba17414a2be3.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>HTML Elements</strong></h2>
<p>An HTML element is the complete unit that is opening tag, content (text, nested elements, or attributes), and closing tag, representing building blocks like a paragraph ,heading or image container.</p>
<pre><code class="language-xml">&lt;h1&gt; I am inside Heading Tag 1&lt;/h1&gt;
&lt;p&gt;I am inside paragraph tag&lt;/p&gt;
&lt;div&gt;This is a container&lt;/div&gt;
</code></pre>
<h2><strong>Common Basic Tags</strong></h2>
<ol>
<li><p>Headers: <code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code></p>
<p>These are for titles and subtitles. <code>&lt;h1&gt;</code> is the most important (the main heading), and <code>&lt;h6&gt;</code> is the smallest.</p>
<pre><code class="language-xml"> &lt;h1&gt;This is a Big Title&lt;/h1&gt;
 &lt;h2&gt;This is a Subheading 1&lt;/h2&gt;
 &lt;h3&gt;This is a Subheading 2&lt;/h3&gt;
</code></pre>
</li>
<li><p>2. Paragraphs: <code>&lt;p&gt;</code></p>
<p>This is for our standard blocks of text.</p>
<pre><code class="language-xml"> &lt;p&gt;This is a sentence inside a paragraph box.&lt;/p&gt;
</code></pre>
</li>
<li><p>Containers: <code>&lt;div&gt;</code></p>
<p>Big Box:Used to group large sections of content together. It starts on a new line.</p>
</li>
<li><p><code>&lt;span&gt;</code> (The Small Box): Used for small bits of text <em>inside</em> a sentence to style them specifically. It stays on the same line.</p>
<pre><code class="language-xml"> &lt;div&gt;
   &lt;h1&gt;Welcome&lt;/h1&gt;
   &lt;p&gt;This is a &lt;span&gt;highlighted&lt;/span&gt; word inside a div.&lt;/p&gt;
 &lt;/div&gt;
</code></pre>
</li>
</ol>
<h2><strong>Self-Closing Elements</strong></h2>
<p>Self-closing (or void) elements don't need a closing tag because they don't wrap content; they end with a slash, like <code>&lt;img src="image.jpg" alt="Description" /&gt;</code> or <code>&lt;br /&gt;</code>. Examples include <code>&lt;img&gt;</code>, <code>&lt;hr&gt;</code>, and <code>&lt;input&gt;</code>, used for images, line breaks, and form inputs.</p>
<pre><code class="language-xml">
    &lt;img src="example.jpg" alt="Sample image"&gt;

    &lt;!-- Line break --&gt;
    &lt;br&gt;

    &lt;!-- Horizontal rule --&gt;
    &lt;hr&gt;

    &lt;!-- Input field --&gt;
    &lt;input type="text" placeholder="Enter text"&gt;

    &lt;!-- Link to stylesheet (in head typically) --&gt;
    &lt;link rel="stylesheet" href="styles.css"&gt;
</code></pre>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771005930824/6a028ed2-e752-41fa-8448-94761b6cbc51.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>Block Vs Inline Elements</strong></h2>
<p>Block-level elements, like “<code>&lt;div&gt;</code>” and <code>&lt;p&gt;</code> ,<code>&lt;nav&gt;</code>,<code>&lt;header&gt;</code> start on new lines and take full width, stacking vertically to form page sections.</p>
<p>Inline elements, like <code>&lt;span&gt;</code> and <code>&lt;a&gt;</code>, flow within text lines without breaking layout, used for styling words or links</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771005512845/001d0001-b92f-4532-bd55-116b1f12e9cb.jpeg" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771005559141/c147daf7-0249-4807-b58e-130d35857269.jpeg" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[TCP Working: 3-Way Handshake & Reliable Communication]]></title><description><![CDATA[Why Internet need rules to send data ?
Suppose there are millions or billions of networks (Device + wires + rules =network) connected with each other, for each network to talk to each other, there nee]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/tcp-working-3-way-handshake-reliable-communication</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/tcp-working-3-way-handshake-reliable-communication</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:49:32 GMT</pubDate><content:encoded><![CDATA[<h2><strong>Why Internet need rules to send data ?</strong></h2>
<p>Suppose there are millions or billions of networks (Device + wires + rules =network) connected with each other, for each network to talk to each other, there needs to be some standard rules that the network needs to follow to communicate with each other.If every network makes its own rules “ how to communicate with each other “ ,then it would be impossible to follow each rules to communicate with each other .So there was a need to have some standard rules( <strong>protocols)</strong>—standardized sets of rules that determine how data is packaged, addressed, and delivered. This is how the rules for effective communication came into existence on the Internet.</p>
<p>The two most important sets of rules for moving data over internet are <strong>TCP</strong> and <strong>UDP.</strong></p>
<h2><strong>What happens if data is sent without rules ?</strong></h2>
<p>If we send data over the internet without reliable rules,the data sent over the internet often gets lost ,arrives out of order , or data can become corrupted,which leads to unreliable communcation between the sender and reciever . TCP( Transmission Control Protocol) fixes this by providing rules for reliable, ordered delivery of data between devices.</p>
<h2><strong>TCP (Transmission Control Protocol)</strong></h2>
<p>Transmission Control Protocol (TCP) is a fundamental protocol of internet that ensure that our data over the Internet gets delivered reliably between devices , like when a web page get loaded or we send an email.</p>
<p>TCP is like reliable courier. It focus is accuracy and order. Before sending anything, it focuses on establishing a connection (a" 3 way handshake") to make sure the receiver is ready to receive.If a piece of data goes missing, TCP notices and resends it.</p>
<p>TCP works at the transport layer of networking. It breaks data into small packets, numbers them, and reassembles the packets at the destination(receiver side) .It uses ‘ 3 way handshake ‘ to establish a connection before sending data to the destination, preventing data loss or jumbling.</p>
<h3><strong>Problems TCP solves</strong></h3>
<ul>
<li><p><strong>Packet Loss -:</strong> Packets can be loss(dropped) by congested routers</p>
</li>
<li><p><strong>Out-of-order Delivery -:</strong> Packets may take different physical paths and arrive in the wrong sequence. on the receiver side.</p>
</li>
<li><p>Data Corruption :- faulty hardware, signal interference or electrical signal drop can lead to corruption of data</p>
</li>
<li><p><strong>Network Congestion:</strong> Sending too much data too fast can overwhelm the receiver or the network</p>
</li>
</ul>
<h2><strong>What is the TCP 3-Way Handshake ?</strong></h2>
<p>Before data transfer begins,the sender and receiver must agree on sequence numbers and verify that they both are now ready to communicate with each other .This is known as three way handshake.</p>
<h3><strong>Step by step working</strong></h3>
<ul>
<li><p>SYN (Synchronize) :- the client(sender) sends a packet with a SYN flag set and a random Initial sequence number(ISN),say X .This means, "I want to start a connection with you".</p>
</li>
<li><p><strong>SYN-ACK (Synchronize-Acknowledge):</strong> The server(receiver) receives the SYN from the sender and responds with its own SYN flag and an ACK flag. It sends its own sequence number (Y) and sets the acknowledgment number to X+1. This means, "I received your request; and I also want to connect".</p>
</li>
<li><p><strong>ACK (Acknowledge):</strong> The client sends a final packet with the ACK flag. It sets the acknowledgment number to Y+1. This means, "I Got it! Let’s start sending data".</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770994179219/a05e7d1d-48ff-4401-ae06-ae7d71b356db.jpeg" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770995327771/986b32fb-dffb-4d18-9064-883a7327a78e.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>How Data Transfer Works in TCP?</strong></h2>
<p>TCP breaks large data into smaller chunks called <strong>segments(packets)</strong>. Each segment(packets) is assigned a <strong>Sequence Number.TCP makes sure</strong> Reliability, Order, and Correctness when sending data .</p>
<ol>
<li><p><strong>Reliability (Retransmission):-</strong> If the sender doesn't receive an ACK for a specific segment within a certain timeframe, it assumes the packet was lost and sends it again.</p>
</li>
<li><p><strong>Order (Sequencing):</strong> The receiver uses the sequence numbers to reassemble the segments in the correct order that was intended, even if they arrived out of sequence.</p>
</li>
<li><p><strong>Correctness (Checksum):</strong> Every TCP header includes a checksum. If the receiver calculates a different checksum than what was sent from the sender’s side, it knows the data is corrupted and discards it, triggering a retransmission.</p>
</li>
<li><p><strong>Flow Control:</strong> The receiver tells the sender how much data it can handle at once (the "Window Size") to prevent being overwhelmed with too much data.</p>
</li>
</ol>
<h3><strong>Keeping Track: Sequence and Acknowledgements</strong></h3>
<p>Once the conversation starts, TCP uses a numbering system to keep things organized.</p>
<ul>
<li><p>Sequence numbers:Every peice of data(packet) gets a number ,like page number of a book.Eeven if the page number 2 arrives before 1,our computer(reciever) know how to put them back in order as connection was established through TCP which ensure correct odering.</p>
</li>
<li><p><strong>Acknowledgements (ACKs):</strong> After the receiver gets a "page," they send a small note back saying, <em>"I got Page 2! Send Page 3 next to me."</em></p>
</li>
</ul>
<h3><strong>Handling Mistakes</strong></h3>
<p>Ther world of internet is not error proof or perfect.Sometimes, a packet or many packets gets lost in the digital "pipes".If the client send Page 3 but never receive an "ACK" (confirmation) for it within a certain timeframe, TCP doesn't just give up on that. It assumes the packet was lost and <strong>automatically sends it again.</strong> This is called <strong>retransmission</strong>. It ensures that even on a shaky connection due to signal interference ,surge in electricity and poor connection, the final result is a perfect, error-free file.</p>
<h2><strong>How a TCP Connection is Closed?</strong></h2>
<p>TCP uses a <strong>4-Way Handshake</strong> to terminate a connection. This is because TCP is "full-duplex"—either side(sender or receiver) can finish sending data while the other is still talking.</p>
<ul>
<li><p><strong>FIN:</strong> The client(sender) sends a FIN (Finish) packet when it has no more data to send.</p>
</li>
<li><p><strong>ACK:</strong> The server(receiver) sends an ACK to acknowledge the client's request. (The server can still send data at this point).</p>
</li>
<li><p><strong>FIN:</strong> Once the server is also done sending data, it sends its own FIN packet.</p>
</li>
<li><p><strong>ACK:</strong> The client sends a final ACK. After a brief waiting period (to ensure the ACK was received), the connection is officially closed.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770995191125/31652e72-59e7-45e3-90d3-7806692a3ba3.jpeg" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Getting Started with cURL]]></title><description><![CDATA[What is a Server?
A server is a powerful computer or software system that stores data, runs applications on it, and delivers content or services to other devices (called clients) over a network like t]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/getting-started-with-curl</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/getting-started-with-curl</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:48:31 GMT</pubDate><content:encoded><![CDATA[<h2><strong>What is a Server?</strong></h2>
<p>A server is a powerful computer or software system that stores data, runs applications on it, and delivers content or services to other devices (called clients) over a network like the internet.Think of server as a digital <a href="http://librarian.It">librarian.It</a>’s a computer located elsewhere that holds information (websites, files, or data) and waits for someone to ask for it.</p>
<p>We need to "talk" to servers because our local devices don't store everything or services that we need. When we check the weather or view a profile on facebook, our computer sends a request to a server, and the server sends the answer back.</p>
<h2><strong>What is cURL ?</strong></h2>
<p><strong>cURL</strong> ( Client URL) is a command-line tool used to exchange data with a server.While a web browser like Chrome or Opera or Firefox talks to servers using a visual interface(UI), cURL allows user to do the exact same thing using only text in our <a href="http://terminal.It"><strong>terminal</strong>.It</a> lets us send HTTP requests directly to servers from our terminal, receiving raw responses without a <a href="http://browser.It">browser.It</a> supports protocols like HTTP, HTTPS, FTP, and more, running on Windows, macOS, Linux, and other systems.</p>
<h2><strong>Simplest Command to Fetch a Webpage</strong></h2>
<p>The most basic cURL command fetches a webpage using a GET request, which is the default method.</p>
<p>Command: curl <a href="https://google.com"><strong>https://google.com</strong></a></p>
<p>When we run the above command in our bterminal it sends a request to the <a href="http://google.com"><strong>google.com</strong></a> server and prints the HTML response directly to our screen.</p>
<h2><strong>Understanding the Response</strong></h2>
<p>When we run the command responses include a status code (like 200 for success,<strong>301 Moved Permanently</strong> or 404 for not found) and the body data (HTML, JSON, etc.). Add “ -i “ in the command to see headers with the status.</p>
<p>Command: curl -i <a href="https://google.com"><strong>https://google.com</strong></a></p>
<p>Running above command shows this</p>
<pre><code class="language-plaintext">HTTP/1.1 301 Moved Permanently
Location: https://www.google.com/
Content-Type: text/html; charset=UTF-8
Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-RFQ8DlDmsty6UPq2pvhRog' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
Reporting-Endpoints: default="//www.google.com/httpservice/retry/jserror?ei=-kmPaY3uN9vG4-EPq8rCsAk&amp;cad=crash&amp;error=Page%20Crash&amp;jsel=1"
Date: Fri, 13 Feb 2026 15:57:46 GMT
Expires: Sun, 15 Mar 2026 15:57:46 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 220
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

&lt;HTML&gt;&lt;HEAD&gt;&lt;meta http-equiv="content-type" content="text/html;charset=utf-8"&gt;
&lt;TITLE&gt;301 Moved&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;
&lt;H1&gt;301 Moved&lt;/H1&gt;
The document has moved
&lt;A HREF="https://www.google.com/"&gt;here&lt;/A&gt;.
&lt;/BODY&gt;&lt;/HTML&gt;
</code></pre>
<p>Programmers use cURL because it is <strong>fast, scriptable, and reliable</strong>.</p>
<ul>
<li><p><strong>Testing:</strong> Programmer can quickly check if a website or server is working without loading heavy graphics.</p>
</li>
<li><p><strong>Automation:</strong> Programmer can write a script that uses cURL to download a file at a particular time interval</p>
</li>
<li><p><strong>Debugging:</strong> It shows exactly what the server is "saying" behind the scenes, including hidden headers and error codes wheich we get from response.</p>
</li>
</ul>
<h2><strong>Two Ways to Talk: GET vs. POST Requests</strong></h2>
<p>Most communication with a server falls into one of these two categories-</p>
<p>GET (Requesting Information):This is like asking the digital librarian, <em>"Can I see the Harry Potter book?"</em> We are strictly <strong>receiving</strong> data without changing anything on the server.</p>
<p><strong>Default:</strong> When we type a basic <code>curl</code> command followed by url , it performs a GET request by default.</p>
<pre><code class="language-plaintext">HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1270

&lt;!DOCTYPE html&gt;...
</code></pre>
<p>A successful GET response starts with <code>HTTP/1.1 200 OK</code>, followed by headers like <code>Content-Type: text/html</code> and the body (HTML/JSON data)</p>
<hr />
<p>POST (Sending Information): This is like handing a form to the librarian and saying, *"Please register me for a library card".We are sending a request to the server to cerate or update something .*To tell cURL to "POST" instead of "GET," we use the <code>-X</code> flag .</p>
<p>Command : curl -X POST <a href="https://jsonplaceholder.typicode.com/users"><strong>https://jsonplaceholder.typicode.com/users</strong></a></p>
<pre><code class="language-plaintext">HTTP/1.1 201 Created
{"id":1,"name":"John"}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[DNS Record Types
]]></title><description><![CDATA[How does a browser know where a website lives?
Our browser translates a website's name, like "google.com", into a numerical IP address using DNS(the internet's phone book).When we enter a URL, the bro]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/dns-record-types</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/dns-record-types</guid><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:47:07 GMT</pubDate><content:encoded><![CDATA[<h2><em><strong>How does a browser know where a website lives?</strong></em></h2>
<p>Our browser translates a website's name, like "<a href="http://google.com/"><strong>google.com</strong></a>", into a numerical IP address using DNS(the internet's phone book).When we enter a URL, the browser first checks in the local cache of the browser for the IP. If it is not found, it queries our device's DNS resolver, which asks root DNS servers, then TLD servers (like .com), and finally the site's authoritative server to get the exact IP address.</p>
<p>With the IP we get back from dns, the browser establishes a connection often via HTTPS—sends an HTTP request for the page, and the server responds with HTML, images, and other resources. This happens very fast, i.e., in milliseconds.</p>
<p>Lets take an real like example with user wants to read a book :</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771155604036/71953bb9-db0b-49d6-9bc0-7a1e367cfcfb.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>What is DNS?</strong></h2>
<p>DNS is like the internet’s phone book. When we type a website name (like <a href="http://example.com/"><strong>example.com</strong></a>), DNS translates it into the numbers (IP address) that computers use to locate that site. So we don’t have to remember long numbers(<strong>192.168.0.0 – 192.168.255.255</strong>) , the DNS does the lookup for us. DNS is like a map that guides our device to the right online address.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771155783042/40e47fe9-db0d-45b4-bdf9-feab655d13db.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>Why DNS records are needed ?</strong></h2>
<p>DNS records are essential instructions stored on a DNS servers that tells the browser exactly where to find a website and its services.DNS translate human redable domain names into a machine readbale IP addresses, elimating the need to remeber the complex numbers like **192.168.0.0 . Without DNS records browser couldn’t trsnalate the '“ example.com “ into a correct server location .DNS Records are flexible, if a website changes servers, we just update the A record, and the users can keep using the same domain name. They also support security through TXT records for verification and SPF to prevent email spoofing.</p>
<h2><strong>What is an NS Record?</strong></h2>
<p>NS (Name Server) record, lists the DNS servers responsible for a domain ,like pointing to the "boss/super admin" servers that manage all its details. It tells the internet which nameservers hold the authoritative info, such as IP addresses or email settings, for that domain.</p>
<p>Domains usually have 2+ NS records for redundancy.They're set at our DNS provider and must pair with A/AAAA records for the nameservers themselves.</p>
<h2><strong>What is an A Record ?</strong></h2>
<p>An A record is a simple DNS entry that links a domain name (like <a href="http://example.com/"><strong>example.com</strong></a>) to its IPv4 address (like 192.0.2.1), acting like a phonebook listing to help our device find the right server online.</p>
<p>Without A records, we would need to memorize/remember and enter numeric IP addresses (complex numbers) for every site, making the internet unusable ,its like trying to call friends by their exact phone numbers instead of names. Multiple “ A “ records can even point to different IPs for load balancing across</p>
<p>Imagine if we want to visit <a href="http://google.com/"><strong>google.com</strong></a> in our browser. Instead of typing the complex IP address ( 142.250.190.14), our device checks DNS servers for Google's A record, which provides that exact IPv4 address so our browser connects directly to their servers.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771156000705/0d69fb97-c299-4fdb-a4b3-3a8701573e9d.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>What is an AAAA Record?</strong></h2>
<p>An AAAA record is a DNS entry that links a domain name (like <a href="http://example.com/"><strong>example.com</strong></a>) to its IPv6 address ( like 2001:0db8:85a3:0000:0000:8a2e:0370:7334), it is similar like an A record which does for IPv4 but here it does for IPv6, an expanded internet addressing system.</p>
<p>AAAA records ensure websites work on future-proof IPv6 networks, often alongside A records (IPv4) for compatibility,our phone picks the best match automatically. Without them, IPv6 users might fail to load sites still stuck on IPv4-only setups.</p>
<p>Think as it like updating a city’s old phonebook from old 4-digit numbers (IPv4, running out of options) to new 16-digit numbers (IPv6, plenty to go around).</p>
<h2><strong>What is a CNAME Record?</strong></h2>
<p>A CNAME record is a DNS entry that creates an alias(stagename / nickname), pointing one domain name ( <a href="http://www.example.com/"><strong>www.example.com</strong></a>) <a href="http://www.example.com/"><strong>to another</strong></a> domain name ( <a href="http://example.com/"><strong>example.com</strong></a>), which then resolves to an IP address via its own A or AAAA record.Unlike A records (old -direct to IPv4) or AAAA ( modern-direct to IPv6), CNAMEs links name to name, not to IPs, adding a slight extra lookup step but simplifying management if the target IP changes.It can't mix with other records on the same name, like MX for email.</p>
<p>Think like a company's website where "<a href="http://blog.yourcompany.com/"><strong>masterji.chaiCode.com</strong></a>" has a CNAME record pointing to "<a href="http://blog.yourcompany.com/"><strong>chaiCode</strong></a><a href="http://yourcompany.com/"><strong>.com</strong></a>". When we type the msaterji address into our browser, DNS follows the alias(nickname/stagename) to the main site, grabs its IP (like from an A record), and loads the page ,which is perfect for redirecting old links or subdomains without changing IPs manually.</p>
<h2><strong>What an MX Record ?</strong></h2>
<p>An MX record is a DNS entry that tells other email servers which mail server handles incoming emails for your domain, including a priority number to decide the order if multiple servers are listed.MX records enable redundancy (backup servers if the main one fails) and load balancing for high email traffic, ensuring reliable delivery even if your web server (via A record) is separate. Without them, emails to our domain might fail entirely.</p>
<p>Let’s take an example -when we send an email to <a href="mailto:friend@yourcompany.com"><strong>friend@yourcompany.com</strong></a>, <a href="mailto:friend@yourcompany.com"><strong>the sender's server c</strong></a>hecks your company's MX record ( pointing to <a href="http://mail.yourcompany.com/"><strong>mail.yourcompany.com</strong></a> with priority 10), connects to that server via SMTP, and delivers the message,like a postal service label directing mail to the right post office branch instead of guessing.</p>
<h2><strong>What a TXT Record ?</strong></h2>
<p>A TXT record is a flexible DNS entry that stores random(arbitrary) text data tied to a domain, originally for human-readable notes but now mainly for machine readable info like verification codes or email security policies.TXT records power SPF/DKIM/DMARC to fight email spam.</p>
<hr />
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771156312027/de65fcf3-9154-4ca8-80a8-0b32e890573f.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>How do all DNS records work together for one website ?</strong></h2>
<p>DNS records work together like a football team for a website ,each player/record has its specific role to play like changin the typed url into into a loaded page, email delivery and verifciation.</p>
<p>Flow to show how each records work ,when we type “ <a href="http://www.example.com">www.example.com</a> ” :</p>
<ol>
<li><p>NS records first direct our device to the right DNS servers owning <a href="http://example.com/"><strong>example.com</strong></a>.</p>
</li>
<li><p>CNAME ( if used ) aliases <code>www.example.com</code> to <code>example.com</code> for simplicity.</p>
</li>
<li><p>A or AAAA records then provide the actual IPv4/IPv6 address to reach the web server.</p>
</li>
<li><p>MX records kick in separately for emails to @<a href="http://example.com/"><strong>example.com</strong></a>, routing to mail servers like</p>
<p><code>mail.example.com</code></p>
</li>
<li><p>TXT records add proof, like SPF text to validate senders and prevent spam.</p>
</li>
</ol>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771155679169/0a797653-c46a-4172-a66e-3c5e6ab9008a.jpeg" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[TCP vs UDP]]></title><description><![CDATA[Why Internet need rules to send data ?
Suppose there are millions or billions of networks (Device + wires + rules =network) connected with each other, for each network to talk to each other, there nee]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/tcp-vs-udp</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/tcp-vs-udp</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:45:31 GMT</pubDate><content:encoded><![CDATA[<h2><strong>Why Internet need rules to send data ?</strong></h2>
<p>Suppose there are millions or billions of networks (Device + wires + rules =network) connected with each other, for each network to talk to each other, there needs to be some standard rules that the network needs to follow to communicate with each other.If every network makes its own rules “ how to communicate with each other “ ,then it would be impossible to follow each rules to communicate with each other .So there was a need to have some standard rules( <strong>protocols)</strong>—standardized sets of rules that determine how data is packaged, addressed, and delivered. This is how the rules for effective communication came into existence on the Internet.</p>
<p>The two most important sets of rules for moving data over internet are <strong>TCP</strong> and <strong>UDP.</strong></p>
<h2><strong>TCP (Transmission Control Protocol)</strong></h2>
<p>Transmission Control Protocol (TCP) is a fundamental protocol of internet that ensure that our data over the Internet gets delivered reliably between devices , like when a web page get loaded or we send an email.</p>
<p>TCP is like reliable courier. It focus is accuracy and order. Before sending anything, it focuses on establishing a connection (a" 3 way handshake") to make sure the receiver is ready to receive.If a piece of data goes missing, TCP notices and resends it.</p>
<p>TCP works at the transport layer of networking. It breaks data into small packets, numbers them, and reassembles the packets at the destination(receiver side) .It uses ‘ 3 way handshake ‘ to establish a connection before sending data to the destination, preventing data loss or jumbling.</p>
<h3><strong>3-way handshake</strong></h3>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770957991257/7580f02f-68b3-4bde-9ce3-ce358b0d8e8b.jpeg" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770961812710/4d748b0d-3e7d-4c73-99ae-f60fc145a130.webp" alt="" style="display:block;margin:0 auto" />

<h2><strong>UDP (User Datagram Protocol)</strong></h2>
<p>UDP is like a “ speedy bird messenger” .It doesn’t care about the handshake or checking if the data arrived at the <a href="http://destination.It">destination.It</a> just sends the data as fast as possible .If a piece of data (packet) is lost then its gone, UDP doesn’t look back for that lost data.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770958154968/6f2c34aa-a25d-466e-9ccd-b1df8da9cf4c.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770958163248/870565cc-9da1-4823-bd9f-405642980e4d.gif" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770961388210/9d41055e-3ab5-4f60-a1c2-7c4cad0cb71b.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>Key difference between TCP and UDP</strong></h2>
<hr />
<table style="min-width:75px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p>Feature</p></td><td><p>TCP</p></td><td><p>UDP</p></td></tr><tr><td><p>Reliablity</p></td><td><p>Guaranteed delivery of data(packets), it retrieves failed packets</p></td><td><p>No guarantee ,it “ fires and forget ”</p></td></tr><tr><td><p>Ordering</p></td><td><p>Data arrives in the exact order that was created in the network layer before sending</p></td><td><p>Data can arrive out of order</p></td></tr><tr><td><p>Speed</p></td><td><p>Slower because of 3 way handshake (due to overhead and checking if data was lost or not)</p></td><td><p>fastest (less delay)</p></td></tr><tr><td><p>Method</p></td><td><p>Connection -oriented</p></td><td><p>Connectionless</p></td></tr></tbody></table>

<h2><strong>When to use which Protocol (TCP vs UDP)</strong></h2>
<ol>
<li><p>Use TCP when accuracy is non-negotiable. If losing a single packet would break the final result , then we need to use TCP. Let’s take real world example when to use TCP ,Email (SMTP), Web browsing (HTTP/HTTPS), File transfers (FTP).</p>
</li>
<li><p>Use UDP when we need speed and need real-time feel are more important then perfect <a href="http://quality.In">quality.In</a> this scenario, a small glitch is better then a long delay.Real world example are Live Video Streaming of Matches , Online gaming ,voice calls, DNS lookup</p>
</li>
</ol>
<h2><strong>What is HTTP ?</strong></h2>
<p><strong>HTTP (HyperText Transfer Protocol) is the language a web browser uses to talk to a web-server.If TCP/UDP are a courier Van/truck then HTTP is the content inside the boxes.</strong></p>
<p>HTTP sits on the application layer (the top layer) ,while TCP sits at the transport layer below it.</p>
<p>A website needs to load perfectly without missing any text or multimedia files, so here the comes the use of TCP as it is reliable and makes sure every data packets arrive in the same excat order and are not lost .When we type a url ,our browser opens a TCP connection first and then sends the HTTP request through the secure connection.</p>
<h2><strong>Why HTTP does not replace TCP ?</strong></h2>
<p>HTTP is the language that web-browser uses to talk to web-server.HTTP focues on semantics (methods, headers, status codes ), but it lacks TCP core functionality like packet ordering, acknowledgement and retransmission of packets lost and flow control.</p>
<p>TCP is like a courier service that gurantess that every package arrive intact, in the right order , and also notfies the sender that package has been delivered correctly. HTTP is like the shipping label and packaging slip on the packages, speacifying “ Deliver webpage content for this “X” URL with these headers “ ,but it relies entirely on the TCP (courier) for actual transport.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770961195495/434e2bdd-a95b-465b-827e-eff77d7ee4f7.webp" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Inside Git: How It Works and the Role of the .git Folder]]></title><description><![CDATA[What the .git folder is and why it exists ?
Prerequisite for git to work :
To have git work locally, we need to install git on our machine
When git is installed on our machine and we start working on ]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/inside-git-how-it-works-and-the-role-of-the-git-folder</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/inside-git-how-it-works-and-the-role-of-the-git-folder</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Mon, 23 Feb 2026 03:36:38 GMT</pubDate><content:encoded><![CDATA[<h2><strong>What the</strong> <code>.git</code> <strong>folder is and why it exists ?</strong></h2>
<h3><strong>Prerequisite for git to work :</strong></h3>
<p>To have git work locally, we need to install git on our machine</p>
<p>When git is installed on our machine and we start working on a project. When we run the command “ git init “ on our terminal in the current working directory, then a “ .git “ folder is created in our directory which is hidden by default in almost every operating system. This is due to protect the integrity of the project.The .git contains entire history of the project changes and if we delete this .git folder or change something in it then we corrupt our version control history; our project is there but history is gone .So “ .git “ folder is the git brain. Every changes are saved in this folder and it contains all the details about our commit history , branches , metadata etc.<br />A .git folder have objects, refs ,HEAD , index and config files and folders.We dont usually touch them directly ,only git manages it.</p>
<h2><strong>Git Objects</strong></h2>
<p>Blob : it has just raw file content, no filename, folder permissions are stored.if there are two files with the same content git ignores one blob.</p>
<h2><strong>Tree (Directory structure)</strong></h2>
<p>Tree represents the filename , folder structure and which blog belongs to which file</p>
<h2><strong>Commit</strong></h2>
<p>Commit contains pointer to a tree , parent commit, author , the timestamp, and commit message. it doesn’t directly store the file, it points to a tree which in turn points to a blob(which contains raw content).Each commit points backward to its parent.This creates a chain .</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770789011725/479f7fc7-ae87-4350-9160-1b632b94e1c3.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>What happens when we work with git commands?</strong></h2>
<p>Suppose we are working on a project and run ‘git init’ command to configure our project to save our history of changes. Suppose we did some in a file script.js and when we run “ git add script.js “ . the following things happen:</p>
<ul>
<li><p>Git reads file content</p>
</li>
<li><p>Create a blob object</p>
</li>
<li><p>Git calculates SHA-1 hash of for that content</p>
</li>
<li><p>Git stores blob in .git/objects</p>
</li>
<li><p>git updates the index(staaging area)</p>
</li>
</ul>
<p>The staging area is preprating for next commit</p>
<p>When we run “ git commit -m “Added feature 1” the following things happen</p>
<ul>
<li><p>Since blob is in the staging area it takes from it</p>
</li>
<li><p>creates a tree object</p>
</li>
<li><p>creates a commit object pointing to the tree that was created</p>
</li>
<li><p>links to the previous commit</p>
</li>
<li><p>Updates branch pointer (like main/master)</p>
</li>
</ul>
<h2><strong>How Git Uses Hashes ?</strong></h2>
<p>Every git object has a hash code which looks like e4d909c290d0fb1ca068ffaddf22cbd0 .If we change one character, then the hash also changes completely.<br />Why hash is imporatant?</p>
<ul>
<li><p>commit hash depends upon tree hash</p>
</li>
<li><p>tree hash depends upon blob hashes</p>
</li>
<li><p>Blob hash depends on file content</p>
</li>
</ul>
<p>so if someone modifies a file in old history, then everything changes from blob hash to treehash to commit hash ,so it leads to integrity in our project.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770788162583/72cc0883-123b-48eb-a572-e8b98f9e7b91.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists ?]]></title><description><![CDATA[Why Version Control Exists

In the phase of software development journey, version control system(VCS) are like tracking machines which helps us to manage code . If VCS is not there then its cumbersome]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/why-version-control-exists</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/why-version-control-exists</guid><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Fri, 20 Feb 2026 17:11:34 GMT</pubDate><content:encoded><![CDATA[<h2><strong>Why Version Control Exists</strong></h2>
<ol>
<li><p>In the phase of software development journey, version control system(VCS) are like tracking machines which helps us to manage code . If VCS is not there then its cumbersome to manage code.</p>
<p>Suppose a developer makes a mistake in the code and it break the whole application, and the developer can’t remember where to look at in the code.This is where VCS comes handy where it allows a developer to get back to the previous section where the application was working .</p>
</li>
</ol>
<h2><strong>What happended before Version Control System(VCS)?</strong></h2>
<p>In software development before VCS was introduced, the developers used to have a pendrive containing the source of the project , each developer was working on different features and saving it on their pendrive but the problem arose when the the final application was to be tested, where each user would have their own copy with different features.The final apllication would have duplicate code of many developers if it were to be merged finally. There was no tracking history of which developer worked on which feature and suppose there was bug in the application, there was no way to track it to the source that easily becasue many developers have worked on the same project. These issues made the project time-consuming, cumbersome, deadline for the project got delayed and project cost increased as it needs more developers to remove the bug .</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770782524910/4e99ac12-ffaf-4b2f-a8ea-4671cd201bcd.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>How VCS came into Rescue?</strong></h2>
<p>Due to the pendrive problem where every developer was working in parallel on the same project on the pendrive and saving on it and when the final project was to be tested then there was issues of duplicate features and if theres was a bug in the code then theres was no way of tracking the code and it was also time consuming to get back to the original working timeline . To save this issue, VCS was introduced. The Linux kernel team needed a better system to work and save their timeline changes. So <strong>Linus Torvalds</strong> created GIT.</p>
<h3><strong>What does Git have?</strong></h3>
<ul>
<li><p>Everyone has a full copy of the project</p>
</li>
<li><p>Everyone has their own timeline of changes made in the project</p>
</li>
<li><p>Everyone can track their change history</p>
</li>
<li><p>Easy to revert back to the working timeline</p>
</li>
<li><p>Branching feature</p>
</li>
<li><p>Very fast</p>
</li>
</ul>
<p>Git solved many problems for developers around the world, where every developer can have copy of the project and work on it independently, have a history of changes done in the project ,go back to the timeline of working feature and can also save it .The time taken for fixing the bug when pendrive/mail/floppy-disk was used mostly for development .</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770784235210/af70aa43-cf3c-49d0-8b2b-1a5cf05747c7.png" alt="" style="display:block;margin:0 auto" />

<p>How GIT works ?</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770784286453/431392bf-589c-4290-ae86-c55ec2e70dbb.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Introdcution to GIT]]></title><description><![CDATA[What is GIT?
Git is an independent distributed version control system which allows a developer to keep the history of changes in the project .So in simple terms, git allows multiple developers to work]]></description><link>https://git-essential-commands-to-learn.hashnode.dev/introdcution-to-git</link><guid isPermaLink="true">https://git-essential-commands-to-learn.hashnode.dev/introdcution-to-git</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><dc:creator><![CDATA[Abhishek Badola]]></dc:creator><pubDate>Tue, 03 Feb 2026 20:05:07 GMT</pubDate><content:encoded><![CDATA[<h2>What is GIT?</h2>
<p>Git is an independent distributed version control system which allows a developer to keep the history of changes in the project .So in simple terms, git allows multiple developers to work on a project and keep the history of changes and can undo those changes if needed.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770143079160/551c15e5-a8a1-4e5b-b2c9-8cbad449261c.png" alt="" style="display:block;margin:0 auto" />

<h2>Why Git is Used?</h2>
<ul>
<li><p>It allows mutiple developers to work on same project independently with the help of branches.</p>
</li>
<li><p>Every developer has its own local history of changes when they work in a project.</p>
</li>
<li><p>Git doesn’t requires internet to work on.It works on the local machine without internet but git need to be installed first on the local machine</p>
</li>
<li><p>Since git has history of changes tracked,we can always revert back to the working phase of the project if any bugs comes.</p>
</li>
</ul>
<h2>Git Basics and Core Terminologies</h2>
<ol>
<li><p>Repository (Our "Project") : It is a folder that contains all files of our project and it also contains a hidden folder called “ .git “ which has all the history of our changes in the project.</p>
</li>
<li><p>Commit ("Snapshot") : It is like a snapshot/picture of our changes in the project.when we commit a change then we tell git to keep a snapshot of all of our changes and store them in a database/file .A commit id which is always unque, and a message explaining changes in the project.</p>
</li>
<li><p>Branch : It is like a pointer to our commit. In old git version the default branch name was master and now mostly main is used. When a developer wants to add a feature on a project ,then it can create a branch which will work in parallel without breaking the already stable code.After testing the developer can merge it with main branch.</p>
</li>
<li><p>HEAD : It is like a marker which points to the current working branch or commit .So it points to the current active version of the project</p>
</li>
</ol>
<h2>Git basic Commands</h2>
<h3><code>git init</code></h3>
<p>This command initialized the current directory into a git repository and create a “ .git “ hiddent folder in it which will save all the changes commited by the developer. git init command lets us use all the git commands after it was run.</p>
<h3>git status</h3>
<p>It tells us exactly what is happedning in our project currently.it tells if there are changes to commit or which files user have changed or what is git ignoring.</p>
<h3>git add</h3>
<p>It adds the all changes to staging area before we commit changes.<br />git add filename : It is the command we run when we want to put our code to the staging area.<br />git add . : It is command that put all the files changes to the staging area.</p>
<h3>git commit</h3>
<p>If the code is in the staging area then it takes everything from it and take a snapshot and save it in the project history.</p>
<p>usage : git commit -m “ change message “</p>
<h3>git log</h3>
<p>It tells the history of our commits that we have made in our project.</p>
<p>git log : It shows a detailed history of commits with complete id , time , autthor etc.</p>
<p>git log —oneline : It shows the short version of git commit history</p>
<h2>Real World Example</h2>
<p>Imagine we start a new Project in our Local machine.</p>
<h3>Prerequisite for git to work in our project , git needs to be installed in our local machine first.</h3>
<ol>
<li><p>initialize git in our project with command “ git init “</p>
</li>
<li><p>Create a file with command “ code index.js” or “ touch index.js “</p>
</li>
<li><p>Check Status with command “ git status “ . It will show a new file that was created and it has not been tracked yet</p>
</li>
<li><p>With command “ git add index.js “ we move the file to the staging area.</p>
</li>
<li><p>With command “ git commit -m ‘‘initail commit : create new js file “ .</p>
</li>
<li><p>To verify our changes we use the command “ git log “</p>
</li>
</ol>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770149025533/d5364126-6d97-4761-9040-77071d6bcbf3.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item></channel></rss>