<?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[ShashankCodes]]></title><description><![CDATA[An engineering journal looking under the hood of modern application frameworks and system design. Exploring structural architecture patterns, internal code exec]]></description><link>https://shashankgautam.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/668f65be988a40878544dbf6/cf542f5f-96d0-48a3-8f2c-0ad31439143d.jpg</url><title>ShashankCodes</title><link>https://shashankgautam.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 16:29:56 GMT</lastBuildDate><atom:link href="https://shashankgautam.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Team Workflows & Damage Control: How Not to Break Production (And How to Fix It When You Do)]]></title><description><![CDATA[Welcome back! In our last post, we mastered git add and looked at how to curate your code across your working and staging areas. Before we look at how…]]></description><link>https://shashankgautam.hashnode.dev/team-workflows-damage-control-how-not-to-break-production-and-how-to-fix-it-when-you-do</link><guid isPermaLink="true">https://shashankgautam.hashnode.dev/team-workflows-damage-control-how-not-to-break-production-and-how-to-fix-it-when-you-do</guid><category><![CDATA[Gitcommands]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[commit]]></category><category><![CDATA[teambuilding]]></category><dc:creator><![CDATA[Shashank Gautam]]></dc:creator><pubDate>Tue, 20 Oct 2026 13:40:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/d48fc13e-2bda-46e2-8348-faea60c9eb93.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome back! In our last post, we mastered <code>git add</code> and looked at how to curate your code across your working and staging areas. </p>
<p>Before we look at how teams work together safely, let’s do a quick recap of the two commands you need right after <code>git add</code>:</p>
<ul>
<li><strong><code>git commit</code>:</strong> This takes everything in your staging area and saves it as a permanent snapshot (a history receipt) with a message explaining what you did. (We will look at this in depth in just a moment!)</li>
<li><strong><code>git pull</code>:</strong> <em>(Note: We mentioned this briefly here just for learning purposes, but we will dive deep into when to use <code>git pull</code>, <code>git merge</code>, and <code>git rebase</code>, which one is safest, and when to use each in a dedicated future post!)</em> This fetches the latest code changes your teammates have pushed to GitHub and merges them directly into your local workspace so you are always up to date.</li>
</ul>
<hr />
<h2>0. A Closer Look at <code>git commit</code> (Saving Your Permanent Snapshot)</h2>
<p>While <code>git add</code> selects your changes, <code>git commit</code> is where those changes are permanently locked into your project's history. </p>
<h3>Why is <code>git commit</code> crucial?</h3>
<ul>
<li><strong>Creates a permanent record:</strong> Every commit acts as a distinct version checkpoint. If something breaks three months from now, you can look back at exact commits to see what changed and who changed it.</li>
<li><strong>Requires a message:</strong> Git forces you to attach a note with <code>-m "Your message here"</code> so anyone reading the project history knows why the change was made.</li>
</ul>
<h3>Best Practices for Writing Commit Messages</h3>
<p>A good commit message should be short, descriptive, and clearly state what the change does. Many professional teams follow standard prefixes to keep history readable:</p>
<ul>
<li><code>feat:</code> for a brand-new feature (e.g., <code>git commit -m "feat: add user login screen"</code>)</li>
<li><code>fix:</code> for fixing a bug (e.g., <code>git commit -m "fix: resolve crash on app startup"</code>)</li>
<li><code>docs:</code> for updating documentation or README files</li>
</ul>
<blockquote>
<p><strong>Pro Tip for Team Cleanliness:</strong> Always make a separate commit for functional changes and clean-up commits. Do not mix code refactoring, whitespace cleanups, or deleting unused files into the same commit where you are adding core logic. Keeping them separate makes it much easier for your team to review actual code changes and trace bugs.</p>
</blockquote>
<hr />
<h2>1. The Team Trap: Why Working in a Team Changes Everything</h2>
<p>When you work entirely by yourself, a mistake only affects your own machine. But the moment you collaborate with a team, the dynamic shifts completely. </p>
<p>Your daily team workflow looks like this:</p>
<ol>
<li>You pull the latest code updates from GitHub (<code>git pull</code>).</li>
<li>You write your new feature on top of that shared foundation.</li>
<li>You stage (<code>git add</code>), commit (<code>git commit</code>), and share your code.</li>
</ol>
<p>In this environment, you have to be extra careful. A single careless <code>git add .</code> can accidentally bundle up your unfinished experiments, broken configuration files, or local debug keys and push them straight to the shared repository—bringing down the entire codebase for your team.</p>
<p>Don't panic if you’ve broken things or made a messy commit before—that is literally the only way anyone learns Git! Let's break down how to prevent accidents and how to undo them when they happen.</p>
<hr />
<h2>2. How to Avoid Accidental Staging (Prevention)</h2>
<p>Before you blindly throw everything into your staging area using <code>git add .</code> or <code>git add -A</code>, use these safety rails:</p>
<ul>
<li><strong>Always check your status first:</strong> 
Run <code>git status</code> before adding anything. Look at the red list. Are there random <code>.DS_Store</code> files, local environment files (<code>.env</code>), or half-baked test scripts staring back at you? Do <em>not</em> use a blanket <code>git add .</code> if there is clutter.</li>
<li><strong>Use <code>.gitignore</code> like a bouncer:</strong> 
Make sure your project has a proper <code>.gitignore</code> file so Git automatically blocks build folders, node modules, and local secrets from ever showing up in your working area.</li>
<li><strong>Be surgical with <code>git add -p</code>:</strong> 
Use interactive patching when you're working on team code so you can review every single line before it enters your staging area.</li>
</ul>
<hr />
<h2>3. Oh No, I Added the Wrong Files! How Do I Revert? (<code>git reset</code>)</h2>
<p>Let's say you panicked and ran <code>git add .</code>, and now half your team's broken experimental code is sitting comfortably in your staging area (green). </p>
<p>How do you take items <em>out</em> of the staging area without deleting your actual code?</p>
<h3>Unstaging a Specific File</h3>
<p>If you want to pull just one file back out of the staging area into your working area:</p>
<ul>
<li><strong>The Command:</strong> <code>git restore --staged &lt;filename&gt;</code> <em>(or the older version: <code>git reset HEAD &lt;filename&gt;</code>)</em></li>
<li><strong>What it does:</strong> It removes the file from the staging area, but your actual code edits remain safely untouched in your working directory.</li>
</ul>
<h3>Unstaging EVERYTHING at Once</h3>
<p>If you want to clear your entire staging area and start fresh:</p>
<ul>
<li><strong>The Command:</strong> <code>git reset</code></li>
<li><strong>What it does:</strong> Instantly empties your staging area. Everything turns back to red, giving you a clean slate to re-curate your changes properly.</li>
</ul>
<hr />
<h2>4. What if I Already Committed the Mistake? (<code>git reset --soft</code> vs <code>--hard</code>)</h2>
<p>What if you didn't just stage the mistake—you actually committed it, or realized right after committing? </p>
<p>Depending on how bad the mistake is, Git gives you different escape hatches:</p>
<h3>Option A: The "Oops, take back the commit, keep my code" (<code>git reset --soft HEAD~1</code>)</h3>
<ul>
<li><strong>When to use:</strong> You committed too early, or your commit message has a typo, and you want to undo the commit <em>without</em> losing any of the code you just wrote.</li>
<li><strong>What it does:</strong> It steps back one commit (<code>HEAD~1</code>), completely erases the receipt, but leaves all your changed files sitting safely in your staging area so you can fix them.</li>
</ul>
<h3>Option B: The Nuclear Option ("Delete everything and take me back to yesterday") (<code>git reset --hard HEAD~1</code>)</h3>
<ul>
<li><strong>When to use:</strong> Your entire codebase is broken, nothing compiles, and you just want to completely wipe out your last commit <em>and</em> all uncommitted changes to return to a clean, working state.</li>
<li><strong>⚠️ WARNING:</strong> This will permanently destroy any uncommitted work you haven't saved elsewhere. Use with extreme caution!</li>
</ul>
<hr />
<h2>Embrace the Breakages</h2>
<p>Every senior engineer you look up to has accidentally pushed a broken build, wiped a file, or had a minor heart alarm staring at a Git terminal. Breaking things is not a failure—it is the crash course that teaches you how Git works. </p>
<p>Take risks, test things out locally, and remember: as long as you haven't force-pushed a disaster to the shared online repository, almost everything on your computer can be fixed.</p>
<p>So far in this series, we have learned how to set up our development environment, create repositories on GitHub, initialize local projects, properly add and curate code, and lock down clean commits. Stay tuned as we keep building our workflow mastery!</p>
<hr />
]]></content:encoded></item><item><title><![CDATA[Mastering git add: The Most Important Step in Your Git Workflow]]></title><description><![CDATA[Welcome back to our Git and GitHub series! In our last blog, we set up our development environment, configured Git, and secured our accounts using SSH keys…]]></description><link>https://shashankgautam.hashnode.dev/mastering-git-add-the-most-important-step-in-your-git-workflow</link><guid isPermaLink="true">https://shashankgautam.hashnode.dev/mastering-git-add-the-most-important-step-in-your-git-workflow</guid><dc:creator><![CDATA[Shashank Gautam]]></dc:creator><pubDate>Sun, 18 Oct 2026 10:16:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/fbd612e9-3a2e-434a-8fbf-6c98c5480a3d.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome back to our Git and GitHub series! In our last blog, we set up our development environment, configured Git, and secured our accounts using SSH keys and Personal Access Tokens (PATs).</p>
<p>When you are starting out with Git, commands like <code>git commit</code> or <code>git push</code> get all the glory. But before you can save or share anything, you have to answer one critical question: <strong>How do you actually tell Git which files you want to include?</strong></p>
<p>That is where <code>git add</code> comes in. But first, before we even start coding, how do we actually create a repository on GitHub, open it locally, and connect them together?</p>
<hr />
<h2>0. Setting Up the Repository: GitHub, <code>git init</code>, &amp; Remote Linking</h2>
<p>If you create a brand-new project folder on your computer, Git doesn't know about it yet.</p>
<h3>1. Creating a Repository on GitHub</h3>
<p>Before linking anything locally, you need a home for your project in the cloud:</p>
<ul>
<li><p>Go to <a href="https://github.com">GitHub.com</a> and log into your account.</p>
</li>
<li><p>In the top-right corner, click the <code>+</code> icon and select <strong>New repository</strong>.</p>
</li>
<li><p>Give your repository a name (e.g., <code>my-website</code>), choose whether it should be Public or Private, and <strong>leave all other boxes (like README or .gitignore) unchecked</strong> so the repository stays completely empty.</p>
</li>
<li><p>Click <strong>Create repository</strong>. Copy the repository URL provided on the next page.</p>
</li>
</ul>
<h3>2. Initializing Git Locally (<code>git init</code>)</h3>
<ul>
<li><p><strong>Where to run it:</strong> Open your terminal, use the <code>cd</code> command to navigate directly into your project's main folder (root directory), and run it there. 
For example: <code>cd Desktop/my-website</code>
You can also do this by using Finder on mac and File Manager on windows/linux,navigate to folder in which you have all the files of your project and right click on folder choose open in terminal and run command.</p>
</li>
<li><p><strong>The Command:</strong> <code>git init</code></p>
</li>
<li><p><strong>What it does:</strong> It sets up an empty tracking system inside your folder, telling Git to start paying attention to everything happening inside.</p>
</li>
</ul>
<h3>3. Connecting to GitHub (<code>git remote add origin</code>)</h3>
<ul>
<li><p><strong>Where to run it:</strong> Right inside the same project folder terminal.</p>
</li>
<li><p><strong>The Command:</strong> <code>git remote add origin https://github.com/your-username/your-repo-name.git</code></p>
</li>
<li><p><strong>What it does:</strong> It links your local project folder to your online remote repository URL so you can push and pull code.</p>
</li>
</ul>
<hr />
<h2>1. Why Do We Need a Staging Area Anyway?</h2>
<p>When working with files, your project is split into two main zones to give you complete control over your progress:</p>
<ul>
<li><p><strong>The working area:</strong> This is your actual project folder where you type, edit, and experiment. Everything you change lives here immediately. It can contain finished work, half-written notes, and accidental mistakes all mixed together.</p>
</li>
<li><p><strong>The staging area:</strong> This is a temporary holding space that sits between your project folder and your permanent history. It allows you to hand-pick specific parts of your work rather than saving everything at once.</p>
</li>
</ul>
<h3>Why this setup is important:</h3>
<ul>
<li><p><strong>Prevents messy records:</strong> If you saved your work automatically without a selection step, your project history would quickly become a cluttered mix of unfinished thoughts and random edits.</p>
</li>
<li><p><strong>Allows selective saving:</strong> You might change five different files while fixing a problem, but you only want to save the updates for two of them right now. This system lets you choose precisely what goes into your permanent record.</p>
</li>
<li><p><strong>Reduces mistakes:</strong> By moving items into a holding space first, you get a clear chance to review your choices and make sure you are not saving broken or unwanted changes by accident.</p>
</li>
</ul>
<hr />
<h2>2. All the Variations of <code>git add</code> (The Complete Guide)</h2>
<p>Depending on what you need, here are all the variations of <code>git add</code> you will ever need:</p>
<h3>1. The Single Item (<code>git add &lt;filename&gt;</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add index.html</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You fixed a quick typo in <code>index.html</code>, but you also have half-finished, broken code in <code>style.css</code>. You only want to stage <code>index.html</code> so you can commit the fix immediately.</p>
</li>
</ul>
<h3>2. The Current Aisle (<code>git add .</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add .</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You just finished building a new "Contact Us" page. You created <code>contact.html</code>, <code>contact.css</code>, and modified <code>app.js</code>. Because they all belong to this one feature, you use the dot (<code>.</code>) to stage them all together.</p>
</li>
</ul>
<h3>3. The Entire Store (<code>git add -A</code> or <code>git add --all</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add -A</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You did a massive project cleanup—moving files into new folders, deleting old unused images, and updating links everywhere. You want to make sure every single move, deletion, and edit is staged project-wide.</p>
</li>
</ul>
<h3>4. The Replacements Only (<code>git add -u</code> or <code>git add --update</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add -u</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You updated several files to fix a bug, but you also created a brand new <code>test-scratchpad.js</code> file just to try out some random ideas. You want to stage all your bug fixes, but ensure your messy scratchpad is ignored.</p>
</li>
</ul>
<h3>5. The Category Batch (<code>git add *.extension</code> or <code>git add folder/</code>)</h3>
<ul>
<li><p><strong>The Command (by file type):</strong> <code>git add *.js</code></p>
</li>
<li><p><strong>The Command (by folder):</strong> <code>git add src/components/</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You ran an image optimizer that modified 50 PNG images across your project. Instead of adding them one by one, you use <code>git add *.png</code> to stage just the images without touching your code files.</p>
</li>
</ul>
<h3>6. The Pro Inspector (<code>git add -p</code> or <code>git add --patch</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add -p</code></p>
</li>
<li><p><strong>How it works:</strong> Git walks through your code <strong>chunk by chunk</strong> and asks <code>y</code> (yes to stage), <code>n</code> (no to ignore), or <code>s</code> (split into smaller pieces).</p>
</li>
<li><p><strong>Real-World Scenario:</strong> You were working in <code>auth.js</code> and fixed a login bug at the top of the file. But further down in the <em>same</em> file, you started writing an incomplete "reset password" feature. You use <code>-p</code> to stage <em>only</em> the bug fix lines and leave the incomplete code unstaged.</p>
</li>
</ul>
<h3>7. The Rule Breaker (<code>git add -f</code> or <code>git add --force</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add -f secret-config.env</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> Your project is set up to automatically ignore all <code>.log</code> files (via <code>.gitignore</code>). However, you specifically need to commit an <code>example_error.log</code> file to show your team what a server crash looks like.</p>
</li>
</ul>
<h3>8. The Wishlist (<code>git add -N</code> or <code>git add --intent-to-add</code>)</h3>
<ul>
<li><p><strong>The Command:</strong> <code>git add -N new-feature.js</code></p>
</li>
<li><p><strong>Real-World Scenario:</strong> You created a blank <code>database.js</code> file but haven't written the code yet. You want Git to acknowledge it exists so it shows up when you run <code>git diff</code> while you are writing, but you don't actually want to stage it for a commit yet.</p>
</li>
</ul>
<hr />
<h2>3. How to Double-Check Before You Commit</h2>
<p>Before you commit your changes, always verify what you have staged using: <code>git status</code></p>
<ul>
<li><p>Files in <strong>green</strong> are staged and ready to be locked in.</p>
</li>
<li><p>Files in <strong>red</strong> are modified files sitting loose in your working area.</p>
</li>
</ul>
<p>You can also view the exact line-by-line changes waiting in your staging area by running: <code>git diff --staged</code></p>
<hr />
<h2>What’s Next?</h2>
<p>By mastering repository creation, initialization, and all the variations of <code>git add</code>, you have complete control over how you curate your changes. You no longer have to guess what is going into your repository!</p>
<p>In the next part of our workflow series, we will take those items out of the staging area and complete the transaction by mastering <code>git commit</code> best practices.</p>
<p>Stay tuned, and happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[Setting It Up on Your Machine]]></title><description><![CDATA[In our previous blog, we looked at why version control is like a doctor's prescription for your code—saving you from working entirely from memory and…]]></description><link>https://shashankgautam.hashnode.dev/setting-it-up-on-your-machine</link><guid isPermaLink="true">https://shashankgautam.hashnode.dev/setting-it-up-on-your-machine</guid><category><![CDATA[#GitSetup, #UbuntuLinux, #GitHub, #VersionControl, #GitCommands, #LinuxDevelopment, #GitConfiguration, #OpenSource, #GitOnUbuntu, #UbuntuTips, #DeveloperTools, #LinuxSetup,]]></category><category><![CDATA[GitHub]]></category><dc:creator><![CDATA[Shashank Gautam]]></dc:creator><pubDate>Sun, 04 Oct 2026 07:49:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/f54aab30-db8c-4423-8762-aa3e3fb6c8c9.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In our previous blog, we looked at why version control is like a doctor's prescription for your code—saving you from working entirely from memory and letting you experiment fearlessly.</p>
<p>Now that you know <em>why</em> you need Git, it is time to get your hands dirty and set it up on your local machine. Don't worry, it only takes a few minutes!</p>
<h2>Step 1: Install Git</h2>
<p>Depending on your operating system, the installation process is straightforward:</p>
<ul>
<li><p><strong>For macOS:</strong> Open your terminal and type <code>git --version</code>. If Git isn't installed already, macOS will automatically prompt you to install the command-line developer tools. Alternatively, you can download it directly from <a href="https://git-scm.com/">git-scm.com</a>.</p>
</li>
<li><p><strong>For Windows:</strong> Download the official installer from <a href="https://git-scm.com/">git-scm.com</a>. During installation, you can safely stick to the default settings recommended by the installer (the Git Bash terminal included is fantastic).</p>
</li>
<li><p><strong>For Linux (Ubuntu/Debian):</strong> Open your terminal and run:</p>
<pre><code class="language-bash">sudo apt update
sudo apt install git
</code></pre>
</li>
</ul>
<h2>Step 2: Verify the Installation</h2>
<p>To make sure everything is installed correctly, open your terminal or command prompt and run:</p>
<pre><code class="language-bash">git --version
</code></pre>
<h2>Step 3: Configure Your Identity</h2>
<p>Before you start writing your first "prescription" (commit), Git needs to know who you are. This ensures that every change you make is stamped with your name and email.</p>
<p>Run the following commands in your terminal, replacing the details with your own name and the email associated with your GitHub account:</p>
<pre><code class="language-bash">git config --global user.name "Your Full Name"
git config --global user.email "your.email@example.com"
</code></pre>
<p>You can verify this configuration as well by running:</p>
<pre><code class="language-bash">git config --list
</code></pre>
<h3>What Even Is "The Cloud"? (And Why Do We Need It?)</h3>
<p>Before we connect your computer to GitHub, let's clear up one phrase that often scares beginners: <strong>"The</strong> Cloud".</p>
<p>You've probably heard people say, <em>"Save your code to the cloud"</em> or <em>"Upload it to GitHub."</em> It sounds like some magical, floating mystery in the sky, right?</p>
<p>In reality, <strong>the cloud is just someone else's computer (a server) sitting in a secure data</strong> centre <strong>somewhere else in the world.</strong></p>
<p>Think of it like this:</p>
<ul>
<li><p><strong>Your Local Machine (Your Laptop):</strong> This is your personal notebook. You write code here, test it, and make mistakes. It is private, but if your laptop ever breaks, gets lost, or spills coffee on itself, that notebook is gone.</p>
</li>
<li><p><strong>The Cloud (GitHub):</strong> This is like a secure, 24/7 bank safety deposit box. When you push your code to GitHub, you are making a safe backup copy on their massive computers.</p>
</li>
</ul>
<p>So, when we talk about "connecting your computer to GitHub", we just mean setting up a secure bridge so your laptop can easily send safe backup copies of your code over to GitHub's servers!</p>
<h2>Step 4: Connecting Your Computer to GitHub</h2>
<p>Now that your computer knows who you are, it needs a secure way to talk to GitHub.</p>
<p>To bridge your laptop and GitHub, you have two main options: <strong>SSH</strong> or a <strong>PAT (Personal Access Token)</strong>.</p>
<h3>Option 1: SSH (The "Set It and Forget It" Way) — <em>Recommended</em></h3>
<p><strong>How it works (The Padlock Example):</strong> Think of an SSH key like a padlock and a physical key. You give GitHub the open padlock (your "public key"), and you keep the only physical key that opens it (your "private key") safely hidden on your laptop. When your laptop tries to send code, GitHub checks if your key fits the padlock. Since it matches perfectly, you are instantly recognized without ever typing a password.</p>
<p><em>(Curious about the tech magic behind this? It's called Asymmetric Cryptography.</em> <a href="https://www.cloudflare.com/learning/ssl/how-does-public-key-encryption-work/"><em>You can read a great, beginner-friendly explanation of how it works right here</em></a><em>.)</em></p>
<ul>
<li><p><strong>Pros:</strong> Once you set it up, you never have to type a password or token again. It works quietly in the background forever.</p>
</li>
<li><p><strong>Cons:</strong> Requires a few terminal commands to set up the first time.</p>
</li>
</ul>
<p><strong>How to set up SSH:</strong><em>(Note: The only thing you need to change below is your email address in Step 1! For the rest, you can copy and paste the commands exactly as they are. The</em> <code>~</code> <em>symbol is a smart terminal shortcut that automatically figures out your computer's username.)</em></p>
<ol>
<li><p>Generate your padlock and key (replace with your GitHub email):</p>
<pre><code class="language-bash">ssh-keygen -t ed25519 -C "your.email@example.com"
</code></pre>
</li>
<li><p>Press <strong>Enter</strong> through all the default prompts to save the key in the standard location without a passphrase.</p>
</li>
<li><p>Start the background service that holds your key by running:</p>
<pre><code class="language-bash">eval "$(ssh-agent -s)"
</code></pre>
</li>
<li><p>Add your new key to the background service:</p>
<pre><code class="language-bash">ssh-add ~/.ssh/id_ed25519
</code></pre>
</li>
<li><p>Copy your public key (the padlock) to your clipboard so you can give it to GitHub:</p>
<ul>
<li><p><strong>macOS:</strong></p>
<pre><code class="language-bash">pbcopy &lt; ~/.ssh/id_ed25519.pub
</code></pre>
</li>
<li><p><strong>Windows (Git Bash):</strong></p>
<pre><code class="language-bash">clip &lt; ~/.ssh/id_ed25519.pub
</code></pre>
</li>
<li><p><strong>Linux:</strong></p>
<pre><code class="language-bash">cat ~/.ssh/id_ed25519.pub
</code></pre>
<p><em>(and copy it manually)</em></p>
</li>
</ul>
</li>
<li><p>Finally, go to your <strong>GitHub account &gt; Settings &gt; SSH and GPG keys &gt; New SSH key</strong>, paste your key there, give it a title (like "My Laptop"), and save it!</p>
<img src="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/51868ea7-d061-4fbe-b90c-2262e7348a76.png" alt="" style="display:block;margin:0 auto" /></li>
</ol>
<hr />
<h3>Dissecting the Magic (What Did You Just Type?)</h3>
<p>If you have never used a terminal before, typing those commands can feel like casting a spell in a language you don't understand. Let's break down exactly what you just told your computer to do, word by word.</p>
<p><strong>1. Generating Your Key</strong><code>ssh-keygen -t ed25519 -C "your.email@example.com"</code></p>
<table>
<thead>
<tr>
<th>Command Part</th>
<th>What it means in plain English</th>
</tr>
</thead>
<tbody><tr>
<td><code>ssh-keygen</code></td>
<td>"Hey computer, start the program that creates keys."</td>
</tr>
<tr>
<td><code>-t</code></td>
<td>"I want a specific <strong>t</strong>ype of key..."</td>
</tr>
<tr>
<td><code>ed25519</code></td>
<td>"...and that type is the ultra-secure, modern 'ed25519' model."</td>
</tr>
<tr>
<td><code>-C</code></td>
<td>"Add a <strong>C</strong>omment (a label) to this key..."</td>
</tr>
<tr>
<td><code>"your.email..."</code></td>
<td>"...and make that label my email address so I know who it belongs to."</td>
</tr>
</tbody></table>
<p><strong>2. Starting the Background Service</strong><code>eval "$(ssh-agent -s)"</code></p>
<p>Think of <code>ssh-agent</code> as a security guard that runs in the background of your computer, holding onto your keys so you don't have to keep typing a password.</p>
<table>
<thead>
<tr>
<th>Command Part</th>
<th>What it means in plain English</th>
</tr>
</thead>
<tbody><tr>
<td><code>ssh-agent</code></td>
<td>"Wake up the background security guard."</td>
</tr>
<tr>
<td><code>-s</code></td>
<td>"Give me the <strong>s</strong>etup instructions to connect to this guard."</td>
</tr>
<tr>
<td><code>$()</code></td>
<td>"Capture those setup instructions in the background."</td>
</tr>
<tr>
<td><code>eval</code></td>
<td>"<strong>Eval</strong>uate (run) those captured instructions right now so the terminal is connected to the guard."</td>
</tr>
</tbody></table>
<p><strong>3. Handing Your Key to the Guard</strong><code>ssh-add ~/.ssh/id_ed25519</code></p>
<p>Now that the guard is awake, you have to actually hand them your new physical key to hold onto.</p>
<table>
<thead>
<tr>
<th>Command Part</th>
<th>What it means in plain English</th>
</tr>
</thead>
<tbody><tr>
<td><code>ssh-add</code></td>
<td>"Hey security guard, please <strong>add</strong> this key to your keychain."</td>
</tr>
<tr>
<td><code>~</code></td>
<td>A shortcut meaning "My computer's main Home folder."</td>
</tr>
<tr>
<td><code>/.ssh/</code></td>
<td>The hidden folder where your computer stores secret keys.</td>
</tr>
<tr>
<td><code>id_ed25519</code></td>
<td>The default file name of the secret, physical key you just generated in Step 1.</td>
</tr>
</tbody></table>
<hr />
<h3>Option 2: PAT (The "Digital Badge" Way)</h3>
<p><strong>How it works (The VIP Wristband Example):</strong> Think of a PAT like a temporary VIP wristband at an event. Later on, when you try to send your code to GitHub for the first time, your computer will ask for your GitHub password. Instead of typing your real password (which GitHub actually blocks for security reasons!), you simply paste this token. If you ever lose the token, you can instantly cancel it and get a new one without changing your real password.</p>
<ul>
<li><p><strong>Pros:</strong> Very straightforward; if you ever worry about security, you can instantly delete just that token from your settings.</p>
</li>
<li><p><strong>Cons:</strong> Tokens expire (like every 30 or 90 days). When they expire, your code pushes will suddenly fail until you generate a new one.</p>
</li>
</ul>
<p><strong>How to create a PAT:</strong></p>
<ol>
<li><p>Go to <strong>GitHub &gt; Settings &gt; Developer settings &gt; Personal access tokens &gt;</strong> Tokens classic.</p>
</li>
<li><p>Click <strong>Generate new token</strong>, give it a name, choose how long it should last, and check the <code>repo</code> permission scope so it can manage your code.</p>
</li>
<li><p>Click generate, copy the token string, and keep it somewhere safe (GitHub only shows it to you once!). Remember, you will use this token whenever Git asks for your password in the terminal.</p>
<img src="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/ac535fb2-b75f-4480-a738-6e7484fac0c6.png" alt="" style="display:block;margin:0 auto" /></li>
</ol>
<hr />
<h3>Which one should you pick?</h3>
<ul>
<li><p><strong>Go with SSH</strong> if you are on your personal laptop. Almost every developer uses it because you set it up once and never have to worry about passwords again!</p>
</li>
<li><p><strong>Go with a PAT</strong> if you prefer a simpler setup or if you are working on a temporary device.</p>
</li>
</ul>
<hr />
<h3>Summary &amp; A Quick Reminder</h3>
<p><strong>To wrap up:</strong> You have just given your computer a secure, password-free way (SSH) or a VIP digital badge (PAT) to talk to GitHub.</p>
<p><strong>A quick note:</strong> If terms like "repository," "HTTPS," or "pushing code" still feel a bit confusing right now—<strong>please don't overthink them!</strong> We are going to look at all of these dedicatedly in the next part of this series when we actually start using them. For now, just pat yourself on the back. The hardest, most technical part of the setup is officially done!</p>
]]></content:encoded></item><item><title><![CDATA[Stop Coding from Memory: An Introduction to Version Control]]></title><description><![CDATA[If you are aiming to be a good software engineer, knowing Git and GitHub, aka version control, is essential. Every day you are going to write a lot of…]]></description><link>https://shashankgautam.hashnode.dev/stop-coding-from-memory-an-introduction-to-version-control</link><guid isPermaLink="true">https://shashankgautam.hashnode.dev/stop-coding-from-memory-an-introduction-to-version-control</guid><category><![CDATA[Git & GitHub Mastery]]></category><category><![CDATA[Git]]></category><dc:creator><![CDATA[Shashank Gautam]]></dc:creator><pubDate>Fri, 02 Oct 2026 19:14:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/668f65be988a40878544dbf6/a2cb0447-d417-4c74-aa5d-7cf0405eda81.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you are aiming to be a good software engineer, knowing Git and GitHub, aka version control, is essential. Every day you are going to write a lot of code, and we put lots of effort into making it better.</p>
<p>There is no point in putting such efforts in if we can't reuse them in the future when we need them.</p>
<p>We can feel the pain through this analogy. Imagine visiting a doctor who just tells you a diagnosis and a list of medicines verbally. By the time you reach home, you might forget the dosage or the exact name.</p>
<p>Doctors write everything down on a prescription. <a href="http://prescription.It">It</a> acts as a reliable record of what worked, what didn't, and what needs to be followed up on.</p>
<p>As engineers, our code is our prescription for solving the problems. Without version control, we are just working from memory—hoping we remember why we wrote a specific line of code six months ago.</p>
<p>Git is your personal notebook that tracks every single change you make to your code.</p>
<p>It allows you to experiment fearlessly. If a new feature breaks your application, you don't have to panic or hit "Undo" a hundred times; you simply revert to a stable version.</p>
<p>It saves your past efforts, allowing you to copy, adapt, and reference solutions you built months ago instead of reinventing the wheel.</p>
<p>If Git is your personal notebook, GitHub is the secure cloud archive where you back it up and share it with the world.</p>
<p>Just as multiple specialists might need to look at a patient's chart, team members can review, suggest improvements, and build upon your code seamlessly.</p>
<p>It serves as public proof of your work, showing the evolution of your skills and projects.</p>
<p>This post is part of my <strong>Git &amp; GitHub Series</strong>, dedicated to taking you from version control beginner to confident developer. Stay tuned for the next article in this category, where we’ll dive into how to set it up on your machine!</p>
]]></content:encoded></item></channel></rss>