<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Himanshu Kumar</title>
    <description>The latest articles on Forem by Himanshu Kumar (@himazing).</description>
    <link>https://forem.com/himazing</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3715287%2Feae9b7dc-04ca-4961-8a21-ce8d72551742.jpg</url>
      <title>Forem: Himanshu Kumar</title>
      <link>https://forem.com/himazing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/himazing"/>
    <language>en</language>
    <item>
      <title>Getting Started with cURL</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Fri, 13 Feb 2026 11:51:08 +0000</pubDate>
      <link>https://forem.com/himazing/getting-started-with-curl-5d3m</link>
      <guid>https://forem.com/himazing/getting-started-with-curl-5d3m</guid>
      <description>&lt;p&gt;Imagine you're sending a quick message to a friend over the internet. Your browser (like Chrome or Firefox) does this automatically when you visit a website it asks the website for the page, and the website sends it back.&lt;br&gt;
cURL is like a tiny messenger you control from your computer's terminal or command prompt. It stands for &lt;strong&gt;client URL&lt;/strong&gt; basically a command-line tool that lets you send requests to servers and get replies, without needing a browser.&lt;br&gt;
It's free, works on Windows, Mac, Linux and is already installed on most computers.&lt;br&gt;
Think of it as your personal way to chat with web servers directly from the command line.&lt;br&gt;
Here's a simple visual of how cURL talks to a server:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr4lnk2n2ak7xkeltqyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr4lnk2n2ak7xkeltqyw.png" alt=" " width="730" height="285"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Why Do Programmers Need cURL?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As a beginner in web dev, you'll build or use APIs (Application Programming Interfaces) these are like doors that let your code talk to other services (like fetching weather data, user info or posting a tweet).&lt;br&gt;
cURL is perfect because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's fast for testing: You can quickly check if an API works without writing full code.&lt;/li&gt;
&lt;li&gt;It helps debug: See exactly what the server sends back.&lt;/li&gt;
&lt;li&gt;No browser needed: Great for servers, scripts, or when you're learning backend stuff.&lt;/li&gt;
&lt;li&gt;Builds confidence: Start simple in the terminal before using it in code (like JavaScript's fetch or Python's requests).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Making Your First Request Using cURL&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Open your terminal (on Mac/Linux: Terminal app and on Windows: Command Prompt or PowerShell).&lt;br&gt;
Type this super simple command and press Enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://chaicode.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happens? cURL sends a message to chaicode.com asking for its homepage, and the server sends back the HTML code of the page you'll see a bunch of text in your terminal (that's the webpage's code!).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;StatusCode        : 200
StatusDescription : OK
Content           : &amp;lt;!doctype html&amp;gt;
                    &amp;lt;html lang="en"&amp;gt;
                      &amp;lt;head&amp;gt;
                        &amp;lt;meta charset="UTF-8" /&amp;gt;
                        &amp;lt;link
                          rel="icon"
                          type="image/svg+xml"
                          href="/assets/favicon-light-B_XE0b_A.svg"
                          media="(prefers-color...
RawContent        : HTTP/1.1 200 OK
                    Transfer-Encoding: chunked
                    Connection: keep-alive
                    Age: 4316
                    cache-status: "Netlify Edge"; hit
                    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.clou...
Forms             : {}
Headers           : {[Transfer-Encoding, chunked], [Connection, keep-alive], [Age, 4316], [cache-status, "Netlify
                    Edge"; hit]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 2143
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it your first reques.&lt;br&gt;
To make it cleaner, try this public test API:&lt;br&gt;
text&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://jsonplaceholder.typicode.com/todos/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll get back some JSON data like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;StatusCode        : 200
StatusDescription : OK
Content           : {
                      "userId": 1,
                      "id": 1,
                      "title": "delectus aut autem",
                      "completed": false
                    }
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    access-control-allow-credentials: true
                    nel: {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"f
                    ailure_fraction":0.1...
Forms             : {}
Headers           : {[Connection, keep-alive], [access-control-allow-credentials, true], [nel, {"report_to":"heroku-nel
                    ","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1}],
                    [pragma, no-cache]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 83
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Understanding Request and Response&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Every time you talk to a server (with browser or cURL), it's a request to response conversation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request: What you send (like "Hey server, give me this page!").&lt;/li&gt;
&lt;li&gt;Response: What comes back (the page content &amp;amp; some info).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A basic response has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Status code like 200 OK (good!), 404 Not Found (oops, page missing), 500 (server error).&lt;/li&gt;
&lt;li&gt;Headers give extra info (like content type: "this is JSON").&lt;/li&gt;
&lt;li&gt;Body is the actual data (HTML, JSON, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try this to see headers too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -i https://chaicode.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's a simple diagram of a basic HTTP request and response:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsk233z5j9ewh2qrmqjm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsk233z5j9ewh2qrmqjm8.png" alt=" " width="800" height="526"&gt;&lt;/a&gt;&lt;br&gt;
Browser or cURL sends request with method, headers, etc and Server replies with status, headers &amp;amp; content.&lt;br&gt;
Browser does the same thing behind the scenes, but cURL lets you see it directly.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Using cURL to Talk to APIs (Just GET and POST)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most beginner APIs use two main methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET: Ask for data (like reading a list of posts). Default in cURL.&lt;/li&gt;
&lt;li&gt;POST: Send data (like creating a new user or submitting a form).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GET example (fetch a post):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://jsonplaceholder.typicode.com/posts/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;POST example (send fake data to create a post):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"title": "My First Post", "body": "Hello world!", "userId": 1}' \
  https://jsonplaceholder.typicode.com/posts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;-X POST: Tells cURL to use POST method.&lt;/li&gt;
&lt;li&gt;-H: Add a header (here, saying data is JSON).&lt;/li&gt;
&lt;li&gt;-d: The data you're sending (in quotes).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server replies with your new &lt;strong&gt;post&lt;/strong&gt; (fake API echoes it back). Try it!&lt;br&gt;
This is how you test APIs before coding them in your app.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Common Mistakes Beginners Make with cURL&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Forgetting quotes around URLs with ? or &amp;amp; (special characters break things). Fix: Use "quotes" like "&lt;a href="https://api.com?key=value" rel="noopener noreferrer"&gt;https://api.com?key=value&lt;/a&gt;".&lt;/li&gt;
&lt;li&gt;Ignoring status codes — if you get error data but don't notice 404 or 401, it confuses you. Always use -i to see status.&lt;/li&gt;
&lt;li&gt;Overloading with too many flags too soon — start simple! Add one option at a time.&lt;/li&gt;
&lt;li&gt;Not using verbose mode for debugging: Add -v (or -vv for more) to see full details when something fails.&lt;/li&gt;
&lt;li&gt;Forgetting the method: For POST/PUT, you need -X POST or it defaults to GET.&lt;/li&gt;
&lt;li&gt;Sending wrong data format: Always match -H "Content-Type: application/json" if sending JSON.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pro tip: When stuck add -v and read what cURL prints as it tells you a lot.&lt;/p&gt;

&lt;p&gt;Connect with Me&lt;br&gt;
Follow me on LinkedIn: &lt;a href="https://www.linkedin.com/in/himazing" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/himazing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>devdiscuss</category>
    </item>
    <item>
      <title>DNS Record Types</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Fri, 30 Jan 2026 17:22:47 +0000</pubDate>
      <link>https://forem.com/himazing/dns-record-types-1g5c</link>
      <guid>https://forem.com/himazing/dns-record-types-1g5c</guid>
      <description>&lt;p&gt;Have you ever thought: &lt;em&gt;How does a browser know where a website lives?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you type &lt;code&gt;google.com&lt;/code&gt;in your browser, you are not really connecting to a &lt;em&gt;name&lt;/em&gt;. You are connecting to a &lt;strong&gt;server computer&lt;/strong&gt; somewhere in the world. As computers do not understand names.They understand &lt;strong&gt;numbers (IP addresses)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So how does the internet convert a name into a number?&lt;br&gt;
The answer is &lt;strong&gt;DNS&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is DNS?
&lt;/h2&gt;

&lt;p&gt;DNS (Domain Name System) is like the &lt;strong&gt;phonebook of the internet&lt;/strong&gt;. Back in the day, if you wanted to call your teacher Hitesh Sir, you had to look up his name in a physical phonebook to find his number: &lt;code&gt;97565XXXXX&lt;/code&gt;. DNS does the exact same thing for the web. It takes a human friendly name like&lt;code&gt;example.com&lt;/code&gt;and translates it into a machine-friendly number like &lt;code&gt;191.19.13.1&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You type a website name
&lt;/li&gt;
&lt;li&gt;DNS finds the IP address
&lt;/li&gt;
&lt;li&gt;Browser connects to that IP
&lt;/li&gt;
&lt;li&gt;Website loads&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why DNS Records Are Needed
&lt;/h2&gt;

&lt;p&gt;A domain name is like a business. That business can have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website
&lt;/li&gt;
&lt;li&gt;Email service
&lt;/li&gt;
&lt;li&gt;Subdomains
&lt;/li&gt;
&lt;li&gt;Verification data
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DNS records are &lt;strong&gt;instructions&lt;/strong&gt; that tell the internet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where the website lives
&lt;/li&gt;
&lt;li&gt;Where emails should go
&lt;/li&gt;
&lt;li&gt;Which company controls this domain
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each record solves a different problem.&lt;/p&gt;

&lt;h1&gt;
  
  
  NS Record (Who Controls the Domain)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;NS is Name Server&lt;/strong&gt; and NS record tells Which DNS servers are responsible for this domain. It tells DNS resolvers which servers to contact when it's looking for DNS records for that domain name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-life analogy
&lt;/h3&gt;

&lt;p&gt;You buy a domain from GoDaddy and you host your website on vercel then your NS record will say "This domain is managed by vercel’s DNS servers".&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>networking</category>
      <category>programming</category>
      <category>ai</category>
    </item>
    <item>
      <title>Understanding Network Devices</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Fri, 30 Jan 2026 06:20:01 +0000</pubDate>
      <link>https://forem.com/himazing/understanding-network-devices-1447</link>
      <guid>https://forem.com/himazing/understanding-network-devices-1447</guid>
      <description>&lt;h2&gt;
  
  
  How Data Travels in a Network
&lt;/h2&gt;

&lt;p&gt;Imagine you want to send a letter to a friend. The letter travels from your house to the post office, then through roads and sorting centers, and finally reaches your friend's house. Computer networks work in a similar way means your device sends data that travels through many devices before reaching its destination.&lt;/p&gt;

&lt;p&gt;Computer networks work in a similar way:&lt;/p&gt;

&lt;p&gt;Your device sends data that travels through many devices before reaching its destination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi096ujekcr5h7s6utcys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi096ujekcr5h7s6utcys.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Types of Network Devices
&lt;/h2&gt;

&lt;p&gt;There are many network devices available, but we will focus on the most commonly used ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modem
&lt;/li&gt;
&lt;li&gt;Router
&lt;/li&gt;
&lt;li&gt;Switch
&lt;/li&gt;
&lt;li&gt;Hub
&lt;/li&gt;
&lt;li&gt;Repeater
&lt;/li&gt;
&lt;li&gt;Load Balancer
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Modem
&lt;/h2&gt;

&lt;p&gt;A modem (Modulator–Demodulator) connects your home or office network to your Internet Service Provider (ISP). A modem converts signals between your Internet Service Provider line and your digital devices.The working of a modem is simple that it converts digital signals from our devices into a form suitable for transmission over the ISP’s physical medium and converts incoming signals back into digital form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzqo88kxui2oi7lgtfax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzqo88kxui2oi7lgtfax.png" alt=" " width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is it needed?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;ISP sends internet signals in a special format
&lt;/li&gt;
&lt;li&gt;Your computer understands only digital data
&lt;/li&gt;
&lt;li&gt;Modem translates between these two&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real-life Analogy
&lt;/h3&gt;

&lt;p&gt;Modem is like a &lt;strong&gt;language translator&lt;/strong&gt; between you and the internet company.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Router?
&lt;/h2&gt;

&lt;p&gt;A router connects multiple devices and decides where data should go.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Router Does
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Assigns local IP addresses to devices
&lt;/li&gt;
&lt;li&gt;Sends data to the correct device
&lt;/li&gt;
&lt;li&gt;Connects your network to the modem
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsum68hi07izzj0mwenh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsum68hi07izzj0mwenh9.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-life Analogy
&lt;/h3&gt;

&lt;p&gt;Router is like a &lt;strong&gt;traffic police officer&lt;/strong&gt; at a junction.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Car (data) arrives
&lt;/li&gt;
&lt;li&gt;Police checks address
&lt;/li&gt;
&lt;li&gt;Sends it on correct road
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hub
&lt;/h3&gt;

&lt;p&gt;Hub sends data to &lt;strong&gt;everyone&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  How Hub Works
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;One device sends data
&lt;/li&gt;
&lt;li&gt;Hub broadcasts to all ports
&lt;/li&gt;
&lt;li&gt;Only correct device accepts
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-life Analogy
&lt;/h4&gt;

&lt;p&gt;It is like a &lt;strong&gt;loudspeaker in a classroom&lt;/strong&gt; that's everyone hears.&lt;/p&gt;

&lt;h4&gt;
  
  
  Problems
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Slow
&lt;/li&gt;
&lt;li&gt;Wastes bandwidth
&lt;/li&gt;
&lt;li&gt;No security
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Switch
&lt;/h3&gt;

&lt;p&gt;Switch sends data only to the &lt;strong&gt;target device&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  How Switch Works
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Learns MAC addresses
&lt;/li&gt;
&lt;li&gt;Stores them in a table
&lt;/li&gt;
&lt;li&gt;Sends data only to matched port
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Analogy
&lt;/h4&gt;

&lt;p&gt;Like a &lt;strong&gt;telephone operator&lt;/strong&gt; connecting your call only to the person you dial.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Firewall?
&lt;/h2&gt;

&lt;p&gt;Firewall protects your network from dangerous traffic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fex0gr8z1lsbdo47de2vp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fex0gr8z1lsbdo47de2vp.png" alt=" " width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What Firewall Does
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Checks every incoming &amp;amp; outgoing packet
&lt;/li&gt;
&lt;li&gt;Allows safe traffic
&lt;/li&gt;
&lt;li&gt;Blocks suspicious traffic
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>network</category>
      <category>networking</category>
    </item>
    <item>
      <title>Why Your Code Needs a Time Machine: A Git Guide for Beginners</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Thu, 29 Jan 2026 16:06:39 +0000</pubDate>
      <link>https://forem.com/himazing/why-your-code-needs-a-time-machine-a-git-guide-for-beginners-g6o</link>
      <guid>https://forem.com/himazing/why-your-code-needs-a-time-machine-a-git-guide-for-beginners-g6o</guid>
      <description>&lt;h1&gt;
  
  
  Git for Beginners: The Essential Guide to Version Control
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What is Git?
&lt;/h2&gt;

&lt;p&gt;Imagine you're writing a book and you save each chapter as "Chapter1_final.docx", then "Chapter1_really_final.docx", and eventually "Chapter1_NO_REALLY_FINAL.docx". We've all been there! Git is the solution to this madness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git is a distributed version control system&lt;/strong&gt; that helps developers track changes in their code over time. Think of it as a super-powered "undo" button with memory - it remembers every change you've ever made, who made it, and when.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Git?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Collaboration Made Easy
&lt;/h3&gt;

&lt;p&gt;Multiple developers can work on the same project simultaneously without stepping on each other's toes. Git manages the merging of changes seamlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Safety Net
&lt;/h3&gt;

&lt;p&gt;Made a mistake? Git lets you revert to any previous version of your code. No more "final_final_v2" files!&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment Freely
&lt;/h3&gt;

&lt;p&gt;Create separate branches to try new features without affecting the main project. If it doesn't work out, simply discard the branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Track Changes
&lt;/h3&gt;

&lt;p&gt;See exactly what changed, who changed it, and why they made those changes through commit messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Git Concepts in Simple Terms
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Repository (Repo)
&lt;/h3&gt;

&lt;p&gt;Your project's folder that Git tracks. It contains all your files and their complete history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;my_project/
├── .git/          &lt;span class="c"&gt;# Git's magic folder (hidden)&lt;/span&gt;
├── index.html
├── style.css
└── script.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Commit
&lt;/h3&gt;

&lt;p&gt;A snapshot of your project at a specific point in time. Like taking a photo of your code that you can return to later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Branch
&lt;/h3&gt;

&lt;p&gt;A parallel version of your repository. The main branch is usually called &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;master&lt;/code&gt;. You create new branches to develop features independently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Head
&lt;/h3&gt;

&lt;p&gt;A pointer to the latest commit in your current branch. Think of it as "you are here" marker on your commit map.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Areas of Git
&lt;/h2&gt;

&lt;p&gt;Understanding these three areas is crucial to mastering Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graph LR
    A[Working Directory&amp;lt;br&amp;gt;Your actual files] --&amp;gt; B[Staging Area&amp;lt;br&amp;gt;Preparing changes] --&amp;gt; C[Repository&amp;lt;br&amp;gt;Saved snapshots]

    C -.-&amp;gt; A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Working Directory&lt;/strong&gt; - Where you edit your files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Staging Area&lt;/strong&gt; - Where you prepare changes for saving&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt; - Where Git permanently stores your commits&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Essential Git Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initialize a new Git repository&lt;/span&gt;
git init

&lt;span class="c"&gt;# Check the status of your repository&lt;/span&gt;
git status

&lt;span class="c"&gt;# See your commit history&lt;/span&gt;
git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Basic Workflow
&lt;/h3&gt;

&lt;p&gt;Let's walk through a typical development session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Create a new project folder&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-project
&lt;span class="nb"&gt;cd &lt;/span&gt;my-project

&lt;span class="c"&gt;# 2. Initialize Git&lt;/span&gt;
git init

&lt;span class="c"&gt;# 3. Create a file&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"# My Awesome Project"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; README.md

&lt;span class="c"&gt;# 4. Check what Git sees&lt;/span&gt;
git status
&lt;span class="c"&gt;# Output: README.md is "untracked"&lt;/span&gt;

&lt;span class="c"&gt;# 5. Stage the file (prepare it for commit)&lt;/span&gt;
git add README.md

&lt;span class="c"&gt;# 6. Commit with a descriptive message&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add project README file"&lt;/span&gt;

&lt;span class="c"&gt;# 7. Check your commit history&lt;/span&gt;
git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Branching Basics
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a new branch for a feature&lt;/span&gt;
git branch feature-login

&lt;span class="c"&gt;# Switch to that branch&lt;/span&gt;
git checkout feature-login
&lt;span class="c"&gt;# Or use the shortcut:&lt;/span&gt;
git switch feature-login

&lt;span class="c"&gt;# Make changes, then merge back to main&lt;/span&gt;
git checkout main
git merge feature-login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Practical Git Workflow Example
&lt;/h2&gt;

&lt;p&gt;Let's build a simple website together using Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start a new project&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-website
&lt;span class="nb"&gt;cd &lt;/span&gt;my-website
git init

&lt;span class="c"&gt;# Create initial files&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;!DOCTYPE html&amp;gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; index.html
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"body { color: blue; }"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; style.css

&lt;span class="c"&gt;# First commit&lt;/span&gt;
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial project setup with HTML and CSS"&lt;/span&gt;

&lt;span class="c"&gt;# Create a branch for navigation&lt;/span&gt;
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; add-navigation

&lt;span class="c"&gt;# Add navigation to index.html&lt;/span&gt;
&lt;span class="c"&gt;# (You would edit the file here)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;nav&amp;gt;Home | About | Contact&amp;lt;/nav&amp;gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; index.html

&lt;span class="c"&gt;# Commit the navigation&lt;/span&gt;
git add index.html
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add navigation bar"&lt;/span&gt;

&lt;span class="c"&gt;# Switch back to main and merge&lt;/span&gt;
git checkout main
git merge add-navigation

&lt;span class="c"&gt;# View your project history&lt;/span&gt;
git log &lt;span class="nt"&gt;--oneline&lt;/span&gt; &lt;span class="nt"&gt;--graph&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Git Commands Cheat Sheet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Starts tracking a folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stages changes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git add file.txt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Saves staged changes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git commit -m "Message"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows repository status&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows commit history&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git log --oneline&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git branch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists/manages branches&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git branch feature-x&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git checkout&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switches branches&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git checkout main&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git merge&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Combines branches&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git merge feature-x&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git clone&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Copies a remote repository&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git clone url&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Uploads commits to remote&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git push origin main&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Downloads remote changes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git pull origin main&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Local Repository Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graph TD
    A[Local Repository] --&amp;gt; B[main branch]
    A --&amp;gt; C[feature-1 branch]
    A --&amp;gt; D[feature-2 branch]

    B --&amp;gt; E[Commit C3&amp;lt;br/&amp;gt;Latest on main]
    E --&amp;gt; F[Commit C2]
    F --&amp;gt; G[Commit C1&amp;lt;br/&amp;gt;Initial commit]

    C --&amp;gt; H[Commit F1&amp;lt;br/&amp;gt;Feature work]
    H --&amp;gt; G

    D --&amp;gt; I[Commit F2&amp;lt;br/&amp;gt;Other feature]
    I --&amp;gt; G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pro Tips for Git Beginners
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Commit Often, Commit Early&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Small, frequent commits are better than huge, infrequent ones. Each commit should represent one logical change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write Meaningful Commit Messages&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Bad: &lt;code&gt;git commit -m "fixed stuff"&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Good: &lt;code&gt;git commit -m "Fix login button alignment on mobile"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use&lt;/strong&gt; &lt;code&gt;.gitignore&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Create a &lt;code&gt;.gitignore&lt;/code&gt; file to exclude temporary files, logs, and dependencies:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_modules/
.env
*.log
.DS_Store
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn to Undo&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* `git restore --staged file.txt` (unstage a file)

* `git restore file.txt` (discard uncommitted changes)

* `git reset --soft HEAD~1` (undo last commit but keep changes)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with the Basics&lt;/strong&gt;
Master &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, &lt;code&gt;log&lt;/code&gt;, and &lt;code&gt;branch&lt;/code&gt; before moving to advanced topics.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember: Everyone was a Git beginner once. The key is to start using it in your projects, make mistakes, and learn from them. Happy coding!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>git</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Inside Git: How It Works and the Role of the .git Folder</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Fri, 16 Jan 2026 18:22:43 +0000</pubDate>
      <link>https://forem.com/himazing/inside-git-how-it-works-and-the-role-of-the-git-folder-53m5</link>
      <guid>https://forem.com/himazing/inside-git-how-it-works-and-the-role-of-the-git-folder-53m5</guid>
      <description>&lt;p&gt;&lt;em&gt;You already type git add, git commit, and git push. They do the job. But do you know what actually happens when you press Enter? This article opens the black box and shows what Git stores inside the hidden .git folder.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start a repo&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir my-app
cd my-app
git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;git init creates the .git folder. That folder is the repository keep it safe. Delete it and your project forgets its history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of Git like a parcel system&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you’re sending parcels by train across India. Each parcel has a unique receipt number. If two parcels contain the same book, the railway uses the same packaging and receipt to save space. Git works similarly:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx1xkzx4i1k5humvwd26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx1xkzx4i1k5humvwd26.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Files are parcels (content).&lt;/li&gt;
&lt;li&gt;Receipts (hashes) identify parcels by content, not by name.&lt;/li&gt;
&lt;li&gt;The depot (.git) stores parcels and receipts, and keeps track of which receipts belong to which shipment (commit).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This idea storing content by its fingerprint is the heart of Git.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is inside .git (the control room)&lt;/strong&gt;&lt;br&gt;
You don’t usually open .git, but it contains everything Git needs:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqt14r14a5j60o9o07gb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqt14r14a5j60o9o07gb.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;objects/ — where all actual data lives (file contents, folders, commits).&lt;/li&gt;
&lt;li&gt;refs/ — pointers to commits (branches, tags).&lt;/li&gt;
&lt;li&gt;HEAD — which branch you’re on right now.&lt;/li&gt;
&lt;li&gt;index — the staging area (what will go into the next commit).&lt;/li&gt;
&lt;li&gt;config, hooks/, info/ — settings and helper scripts.
Think: .git is not a spare folder. It is the repository. The rest of your project is just the working copy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The three building blocks&lt;/strong&gt;&lt;br&gt;
Git stores everything using only three object types:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4w3wac92cnopxtbgaezl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4w3wac92cnopxtbgaezl.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blob- the raw file content. No name, no path. Just bytes.
Analogy: the book inside the parcel.&lt;/li&gt;
&lt;li&gt;Tree- a directory listing that maps names → blobs or subtrees.
Analogy: the list of parcel labels inside a crate.&lt;/li&gt;
&lt;li&gt;Commit- a snapshot of the whole project at one moment. It points to a top-level tree and to previous commit(s). It includes author, date, and message.
Analogy: a train manifest that points to the crate (tree) and previous manifests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All these objects live under &lt;em&gt;objects/&lt;/em&gt; and are named by a hash (their fingerprint).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What git add actually does&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjcfbrnxftdb3v5pox6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjcfbrnxftdb3v5pox6f.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
You may say “I staged the file.” Internally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git reads the file content from your working folder.&lt;/li&gt;
&lt;li&gt;It creates a blob object from that content (unless an identical blob already exists).&lt;/li&gt;
&lt;li&gt;It stores the blob under .git/objects/ using a name derived from a hash.&lt;/li&gt;
&lt;li&gt;It updates the index with a mapping: filename → blob-hash.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So staging is preparing a list of exact content objects to include in the next snapshot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What git commit actually does&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcqwdq59x0yll1u51yohp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcqwdq59x0yll1u51yohp.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
When you commit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git reads the index (the staged blueprint).&lt;/li&gt;
&lt;li&gt;It creates tree objects that represent directory structure and map filenames to blob hashes.&lt;/li&gt;
&lt;li&gt;It creates a commit object that points to the top tree and to parent commits; commit stores message, author, time.&lt;/li&gt;
&lt;li&gt;It updates a branch ref (like refs/heads/main) to point to the new commit and leaves HEAD pointing there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Result: a new snapshot is saved. Git only writes new objects for changed content unchanged blobs are reused.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Pendrive Problem: Why Version Control Was Born</title>
      <dc:creator>Himanshu Kumar</dc:creator>
      <pubDate>Fri, 16 Jan 2026 17:40:55 +0000</pubDate>
      <link>https://forem.com/himazing/the-pendrive-problem-why-version-control-was-born-4j8l</link>
      <guid>https://forem.com/himazing/the-pendrive-problem-why-version-control-was-born-4j8l</guid>
      <description>&lt;p&gt;Back in the day, developers literally carried code around on USB sticks (pendrives). Imagine Alice finishing a feature and walking over to Bob's desk with a thumb drive of code. As one blogger quipped, "Whoever pastes last wins" - meaning the last copy overwrote everyone else's work. Saving code felt like surgery without anesthesia: every commit was a gamble. Without any automated backup or history, one dev's bug fix could vanish the moment a colleague pushed their version over it. This chaos meant code would disappear without warning - nobody knew why or when the latest change was lost.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukl65cgrsslgbjpo7e10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukl65cgrsslgbjpo7e10.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;br&gt;
Even sharing by email wasn't much better. Teams ended up with dozens of zipped files named project_code_final.zip, project_code_final_updated.zip, project_code_final_updated_NEW.zip, etc.. Now someone always had to ask, "Which one is latest?" It was madness: the more times you saw the word "final" in a filename, the less final it usually was.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Nightmare of No Version Control&lt;/strong&gt;&lt;br&gt;
Before Git and modern systems, these problems were normal: developers accepted that manual file copying would cause pain. The core issues included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Code Overwrites: When two people edited the same file manually, one person's changes would silently delete the other's work. There was no merge tool - the "last copy" simply won.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No History: Every change left no permanent record. If a bug crept in, the team had no timeline to inspect. They couldn't easily answer "who changed this line?" or "when did the issue start?".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Collaboration Chaos: Two devs working in parallel was guaranteed chaos. You couldn't safely branch out. Teams often had to serialize work (one person at a time) or painfully merge by hand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No Rollback: If yesterday's code was better… too bad. There was no easy undo. Unless someone kept an old backup, a bad change was permanent.&lt;br&gt;
These were real obstacles, not just hypothetical risks. Developers spent more time chasing files and lost patches than writing new features. Every "final_final_v2_FINAL" folder was a Band-Aid over a broken process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F668fp5xv4lix4wmwqj41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F668fp5xv4lix4wmwqj41.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;br&gt;
All that manual copying led to total chaos. In the illustration above, one panel shows a developer juggling multiple "final" folders - a classic folder-naming Olympiad. Rather than progress, teams ended up with dozens of almost-identical copies. Nobody could tell which folder was the true latest version. The graphic also hints at crashes and overwritten files: without version control, the last save wins, and everything else is lost. In short, this era was a recipe for confusion and lost work.&lt;br&gt;
 &lt;br&gt;
&lt;strong&gt;Why We Needed Version Control&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe420i3lfnhl5fnho6pau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe420i3lfnhl5fnho6pau.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
This messy method was fine for tiny projects, but it fell apart at scale. The true tipping point came with the Linux kernel. By the early 2000s, thousands of developers worldwide were collaborating on Linux. They initially used a tool called BitKeeper, but in 2005 its free license was revoked for Linux development. Suddenly the community had no suitable tool to manage their massive codebase.&lt;br&gt;
Linus Torvalds solved the problem by building Git from scratch in 2005. He designed Git with clear goals: lightning-fast operations, a simple but powerful architecture, strong support for thousands of parallel branches, fully distributed repositories, and efficiency with large projects. In other words, Git was tailored to handle exactly the issues that pendrives and shared folders couldn't. It was built not for convenience, but for reliability under real-world pressure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Version Control to the Rescue&lt;/strong&gt;&lt;br&gt;
With version control (like Git), everything changed. Instead of physically passing files around, each developer clones the full repository to their own machine. They work locally, then "push" changes to a shared repo or server. The image below shows this modern workflow: multiple devs push and pull to a central Git server with a continuous commit history.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zgqcintle9x46zzq5r6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zgqcintle9x46zzq5r6.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;br&gt;
Now every change is a recorded commit (think of it as a snapshot) stamped with the author and timestamp. No one can accidentally overwrite another's work without Git noticing - conflicts get flagged up immediately. If a bug appears, you can time-travel back to any previous commit and undo the mistake. As one summary table (below) highlights, version control drops the risk of data loss to very low and gives a complete history of every change. In practice, this means developers can confidently experiment (new branches), track down who changed what, and recover any lost code. Mistakes become reversible rather than catastrophic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Life After Version Control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsncfunvbcxtl7ii1znad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsncfunvbcxtl7ii1znad.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
Today, using version control is the norm. Tools like Git and platforms like GitHub/GitLab/WebSVN host billions of lines of code and coordinate teams everywhere. For perspective, GitHub reports over 150 million developers and 420 million repositories on its platform. Surveys show Git is now used by nearly 95% of developers as their primary VCS. In this new world:&lt;br&gt;
Developers push code fearlessly, knowing they can always git revert or git checkout an old commit if needed.&lt;br&gt;
Open-source projects scale to thousands of contributors because every merge and branch is tracked automatically.&lt;br&gt;
Teams sleep better: they trust that "oops" moments are just a few commands away from being fixed.&lt;br&gt;
(Side note: Git is just the underlying tool; platforms like GitHub are online hubs that make collaboration social and cloud-based. But whether you use GitHub, GitLab or another service, the power comes from Git itself.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embracing the Peace of Mind&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje0ldjakf07a225xli95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje0ldjakf07a225xli95.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
In the end, version control isn't about loving the commands - it's about trust. Trust that your code won't vanish, that teammates won't unknowingly overwrite your work, and that every change is recorded in a fail-safe timeline. Version control was born not because developers were gadget-hungry, but because old habits had become unworkable. Passing files around on pendrives simply couldn't support growing teams and complex software. Git (and its peers) fundamentally replaced that chaos with an unbroken history of the code.&lt;br&gt;
So next time you hesitate to hit Save or Push, remember: you're not committing code - you're committing peace of mind. Version control means nothing is truly final until you say so, and even then, you can always rewind. It's what lets us write code confidently together, knowing there's always a safety net.&lt;/p&gt;

</description>
      <category>git</category>
      <category>webdev</category>
      <category>github</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
