<?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>DEV Community: K-kibet</title>
    <description>The latest articles on DEV Community by K-kibet (@kkibet).</description>
    <link>https://dev.to/kkibet</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%2F688785%2F5d09c904-e9f1-4c3c-a338-1f484b44c298.png</url>
      <title>DEV Community: K-kibet</title>
      <link>https://dev.to/kkibet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kkibet"/>
    <language>en</language>
    <item>
      <title>Terminal commands to check Git remote configurations</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Thu, 27 Nov 2025 17:06:07 +0000</pubDate>
      <link>https://dev.to/kkibet/terminal-commands-to-check-git-remote-configurations-2b90</link>
      <guid>https://dev.to/kkibet/terminal-commands-to-check-git-remote-configurations-2b90</guid>
      <description>&lt;p&gt;Here are the commands to check Git remote configurations:&lt;/p&gt;

&lt;h2&gt;
  
  
  Check Remote URLs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows all remote repositories with their fetch and push URLs.&lt;/p&gt;

&lt;h2&gt;
  
  
  List Remote Names
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows just the names of your remotes (usually "origin").&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Detailed Remote Info
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote show origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows detailed information about a specific remote including fetch/push URLs and branch tracking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check Remote URL for Specific Remote
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--get&lt;/span&gt; remote.origin.url
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Directly gets the URL for the "origin" remote.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Output Examples
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git remote -v
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't see any output, it means no remote repositories are configured. You can add one with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin &amp;lt;repository-url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>terminal</category>
      <category>cli</category>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Remove All Git Commits Locally Without Losing Your Code</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 07:08:40 +0000</pubDate>
      <link>https://dev.to/k-kibet/how-to-remove-all-git-commits-locally-without-losing-your-code-1pde</link>
      <guid>https://dev.to/k-kibet/how-to-remove-all-git-commits-locally-without-losing-your-code-1pde</guid>
      <description>&lt;p&gt;When working on a project, there are times you may want to completely remove your Git history — maybe your commit log is messy, you accidentally pushed sensitive details, or you simply want to start fresh. The good news is that you can wipe out every Git commit in a local repository &lt;strong&gt;without losing a single line of your code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll walk through a simple and safe way to remove all Git commits locally and start over with clean version control.&lt;/p&gt;




&lt;h3&gt;
  
  
  ## &lt;strong&gt;Why Remove Git History?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are several good reasons developers reset their Git history:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;To clean up messy commits&lt;/strong&gt; and start fresh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To remove accidentally committed files&lt;/strong&gt;, like environment variables or API keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To prepare a project for open-source release&lt;/strong&gt; without exposing past work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To reduce repository size.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To disconnect the project from a previous remote repository&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whatever your reason is, the process is straightforward.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Method 1: Remove Git Completely (Keep Only Your Code)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you want to detach the project from Git entirely, use this method. It deletes all Git tracking and history but keeps all your project files safe.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Delete the &lt;code&gt;.git&lt;/code&gt; directory&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;On macOS/Linux:&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="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; .git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Windows (PowerShell):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the &lt;code&gt;.git&lt;/code&gt; folder is gone, the project is no longer a Git repository. None of your files are deleted.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Method 2: Reset Git and Start a Fresh Repo&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you still want the project under Git but with a completely clean commit history, follow these steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Delete the Git history&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; .git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Reinitialize a new Git repository&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Add all your existing files&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Create the first clean commit&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you a brand-new repository with your full project files but zero previous commits.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Optional: Reconnect to a Remote Repository&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you want to push the fresh repo to GitHub, GitLab, or Bitbucket, add your remote:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin your-repo-url.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;--force&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; Using &lt;code&gt;--force&lt;/code&gt; will overwrite the remote history.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Clearing your Git history is a powerful way to clean up your project, enhance privacy, or prepare your code for a new workflow. The best part? You don’t lose any of your files — only the commit history is wiped.&lt;/p&gt;

&lt;p&gt;Whether you’re cleaning up a personal project or preparing for a professional deployment, starting fresh with a clean Git history can make your repository easier to understand and maintain.&lt;/p&gt;

</description>
      <category>git</category>
      <category>tooling</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🧹 How to Clear Cache in Windows Using PowerShell (Complete Guide)</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 07:04:44 +0000</pubDate>
      <link>https://dev.to/k-kibet/how-to-clear-cache-in-windows-using-powershell-complete-guide-419n</link>
      <guid>https://dev.to/k-kibet/how-to-clear-cache-in-windows-using-powershell-complete-guide-419n</guid>
      <description>&lt;p&gt;Keeping your Windows PC clean and responsive is important—especially if you use it daily for development, gaming, work, or general browsing. Over time, Windows stores piles of temporary files, thumbnails, DNS entries, and other cached data that can slow down your system, eat up disk space, and sometimes cause weird system glitches.&lt;/p&gt;

&lt;p&gt;The good news? You can delete all these caches easily using &lt;strong&gt;PowerShell&lt;/strong&gt;, Windows’ powerful command-line tool. This guide walks you through the exact commands you need and explains what each one does.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔴 Why Clear Cache in Windows?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Windows creates cache files to improve performance, but they can become harmful when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apps start running slowly&lt;/li&gt;
&lt;li&gt;The system becomes sluggish&lt;/li&gt;
&lt;li&gt;Files refuse to open or load&lt;/li&gt;
&lt;li&gt;Disk space gets low&lt;/li&gt;
&lt;li&gt;Old thumbnails or corrupted temp files cause bugs&lt;/li&gt;
&lt;li&gt;DNS cache causes browsing issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clearing cache is safe and often fixes these problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🟦 PowerShell vs CMD — What’s the Difference?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Many online guides use &lt;strong&gt;CMD (Command Prompt)&lt;/strong&gt; commands like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;del /q/f/s %TEMP%\*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But these &lt;strong&gt;do NOT work in PowerShell&lt;/strong&gt;, because PowerShell uses different syntax and more powerful commands.&lt;/p&gt;

&lt;p&gt;So here are the correct and safe &lt;strong&gt;PowerShell&lt;/strong&gt; commands.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧹 1. Clear User Temporary Files&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Your user TEMP folder fills up with leftover files from installers, browsers, and apps.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;TEMP&lt;/span&gt;&lt;span class="s2"&gt;\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This wipes all temporary files for the current user account.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧹 2. Clear Windows Temp Folder&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This folder stores system-wide temp files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Windows\Temp\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Make sure you open PowerShell &lt;strong&gt;as Administrator&lt;/strong&gt; for this step.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧼 3. Flush DNS Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If websites fail to load or you get unusual network errors, your DNS cache may be corrupt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Clear-DnsClientCache&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This resets your DNS entries and can instantly fix browsing issues.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧹 4. Clear Windows Prefetch Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Prefetch folder helps Windows launch programs faster, but it can get bloated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Windows\Prefetch\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows rebuilds this folder automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧹 5. Clear Thumbnail Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If File Explorer shows wrong or broken thumbnails, clear them using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;LocalAppData&lt;/span&gt;&lt;span class="s2"&gt;\Microsoft\Windows\Explorer\thumbcache_*.db"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Stop-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;explorer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Start-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;explorer&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restarting Explorer refreshes your system thumbnail cache immediately.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧼 6. Reset Microsoft Store Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If the Microsoft Store won’t load or shows errors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Start-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wsreset.exe"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This resets all Store-related cache data.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🟩 Combined PowerShell Script (Run All at Once)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you want a single command set that clears everything, paste this in PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;TEMP&lt;/span&gt;&lt;span class="s2"&gt;\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Windows\Temp\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Clear-DnsClientCache&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nx"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Windows\Prefetch\*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Recurse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;LocalAppData&lt;/span&gt;&lt;span class="s2"&gt;\Microsoft\Windows\Explorer\thumbcache_*.db"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Stop-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;explorer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Start-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;explorer&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Start-Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wsreset.exe"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Write-Host&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"✅ Cache cleanup complete!"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives your system a fresh start in under a minute.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🎯 Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Manually cleaning up cache can dramatically improve system responsiveness, free up disk space, and solve minor Windows problems. PowerShell is the most reliable tool for this because it gives full control and avoids errors that CMD-based methods often cause.&lt;/p&gt;

&lt;p&gt;Run this cleanup once a month—or any time your PC starts feeling slow—and enjoy a cleaner, faster Windows experience.&lt;/p&gt;

</description>
      <category>cli</category>
      <category>performance</category>
      <category>microsoft</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Connect Your Namecheap Domain to a Render App (Step-by-Step Guide)</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:58:03 +0000</pubDate>
      <link>https://dev.to/k-kibet/how-to-connect-your-namecheap-domain-to-a-render-app-step-by-step-guide-254j</link>
      <guid>https://dev.to/k-kibet/how-to-connect-your-namecheap-domain-to-a-render-app-step-by-step-guide-254j</guid>
      <description>&lt;p&gt;If you're hosting your web app on &lt;strong&gt;Render&lt;/strong&gt; and want to use a &lt;strong&gt;custom domain from Namecheap&lt;/strong&gt;, the setup is easier than it looks. In this guide, I’ll walk you through the complete process—from adding your domain on Render to configuring DNS records on Namecheap and enabling HTTPS.&lt;/p&gt;

&lt;p&gt;Whether you're deploying a full-stack app, API, or static website, the steps are the same. Let’s get started!&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔧 Step 1: Add Your Custom Domain in Render&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Log in to your &lt;strong&gt;Render Dashboard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Open the app you want to connect (Static Site or Web Service).&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Settings&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Scroll down to &lt;strong&gt;Custom Domains&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add Custom Domain&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the domain you purchased from Namecheap (e.g., &lt;code&gt;example.com&lt;/code&gt; or &lt;code&gt;www.example.com&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Continue&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Render will now generate &lt;strong&gt;DNS records&lt;/strong&gt; that you need to add in your Namecheap dashboard. Keep this page open—you’ll need the values.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🌐 Step 2: Configure DNS Records in Namecheap&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Log in to your &lt;strong&gt;Namecheap&lt;/strong&gt; account.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Domain List&lt;/strong&gt; → click &lt;strong&gt;Manage&lt;/strong&gt; next to your domain.&lt;/li&gt;
&lt;li&gt;Switch to the &lt;strong&gt;Advanced DNS&lt;/strong&gt; tab.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before adding new records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove any old or conflicting DNS records (A, CNAME, URL redirect records).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now add the records Render provided. Usually, the setup looks like this:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;For your main/root domain (&lt;code&gt;example.com&lt;/code&gt;):&lt;/strong&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Host&lt;/th&gt;
&lt;th&gt;Value (Target)&lt;/th&gt;
&lt;th&gt;TTL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;Render IP address (shown in Render)&lt;/td&gt;
&lt;td&gt;Auto&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;For the &lt;code&gt;www&lt;/code&gt; subdomain (&lt;code&gt;www.example.com&lt;/code&gt;):&lt;/strong&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Host&lt;/th&gt;
&lt;th&gt;Value (Target)&lt;/th&gt;
&lt;th&gt;TTL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CNAME&lt;/td&gt;
&lt;td&gt;www&lt;/td&gt;
&lt;td&gt;your-app-name.onrender.com (or equivalent)&lt;/td&gt;
&lt;td&gt;Auto&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If Render gave you unique DNS targets or a different setup, be sure to use the exact values shown on your dashboard.&lt;/p&gt;

&lt;p&gt;Once you save your changes, DNS propagation begins. This usually completes within a few minutes but can take up to a few hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔒 Step 3: Enable HTTPS on Render&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After your DNS records propagate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Return to the &lt;strong&gt;Custom Domains&lt;/strong&gt; section in Render.&lt;/li&gt;
&lt;li&gt;Wait for Render to verify your domain.&lt;/li&gt;
&lt;li&gt;Once verified, click &lt;strong&gt;Enable Automatic HTTPS&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Render will automatically issue an SSL certificate via Let’s Encrypt. When completed, your website will be accessible securely via &lt;strong&gt;HTTPS&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧪 Step 4: Test Your Domain&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After everything is set up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visit &lt;code&gt;https://yourdomain.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Or &lt;code&gt;https://www.yourdomain.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should now see your Render-hosted application running under your custom domain.&lt;/p&gt;

&lt;p&gt;If the site doesn’t load immediately, don’t worry—DNS propagation may still be in progress.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔍 Bonus Tips&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Check DNS Propagation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;whatsmydns.net&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dnschecker.org&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enter your domain and check if the A and CNAME records have updated globally.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Choose between root or www&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can choose whichever will serve as your primary address:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary:&lt;/strong&gt; &lt;code&gt;example.com&lt;/code&gt; ➝ redirect &lt;code&gt;www.example.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Primary:&lt;/strong&gt; &lt;code&gt;www.example.com&lt;/code&gt; ➝ redirect &lt;code&gt;example.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Render lets you configure domain redirects easily in the Custom Domains section.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🎉 Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Connecting a custom domain from Namecheap to Render is straightforward once you understand the DNS steps. With your custom domain in place, your project looks more professional, builds trust, and becomes easier for users to access.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🔥 How to Generate a JKS Keystore Without Android Studio (Complete Guide)</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:52:14 +0000</pubDate>
      <link>https://dev.to/k-kibet/how-to-generate-a-jks-keystore-without-android-studio-complete-guide-36do</link>
      <guid>https://dev.to/k-kibet/how-to-generate-a-jks-keystore-without-android-studio-complete-guide-36do</guid>
      <description>&lt;h3&gt;
  
  
  &lt;em&gt;A simple tutorial for creating a &lt;code&gt;.jks&lt;/code&gt; file using Keytool — with fixed passwords, alias, and automated command&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Android developers often rely on &lt;strong&gt;Android Studio&lt;/strong&gt; to generate a signing keystore for their apps. But what if you want to create a &lt;code&gt;.jks&lt;/code&gt; file &lt;strong&gt;without opening Android Studio&lt;/strong&gt;?&lt;br&gt;
Maybe you're working on a server, CI/CD pipeline, or a lightweight development environment where Android Studio isn't installed.&lt;/p&gt;

&lt;p&gt;This guide walks you through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing the JDK (if missing)&lt;/li&gt;
&lt;li&gt;Enabling the &lt;code&gt;keytool&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;Generating a &lt;code&gt;.jks&lt;/code&gt; keystore &lt;strong&gt;non-interactively&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Using fixed credentials (storePassword, keyPassword, alias)&lt;/li&gt;
&lt;li&gt;Creating a matching &lt;code&gt;key.properties&lt;/code&gt; file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s get started.&lt;/p&gt;


&lt;h1&gt;
  
  
  &lt;strong&gt;1. The Goal (What We Want to Generate)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;We want a &lt;code&gt;.jks&lt;/code&gt; file named:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;goalkings.jks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With these credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;storePassword = goalkings
keyPassword   = goalkings
keyAlias      = goalkings
storeFile     = goalkings.jks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we want to generate it &lt;strong&gt;using a single command&lt;/strong&gt;, without Android Studio, without answering prompts.&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;2. Checking If &lt;code&gt;keytool&lt;/code&gt; Works&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Before generating the keystore, we must ensure that Java’s &lt;code&gt;keytool&lt;/code&gt; utility is available.&lt;/p&gt;

&lt;p&gt;Open PowerShell or CMD and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;keytool &lt;span class="nt"&gt;-help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The term 'keytool' is not recognized...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…it means the JDK isn't installed &lt;em&gt;or&lt;/em&gt; not added to PATH.&lt;/p&gt;

&lt;p&gt;Let's fix that.&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;3. Install the Java Development Kit (JDK)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If Java isn’t installed, download and install a JDK:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adoptium (recommended):&lt;/strong&gt; &lt;a href="https://adoptium.net" rel="noopener noreferrer"&gt;https://adoptium.net&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oracle JDK:&lt;/strong&gt; &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During installation, note where the JDK is installed. Usually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Program Files\Java\jdk-17\
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Program Files\Java\jdk-21\
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  &lt;strong&gt;4. Add JDK to PATH (Windows)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you installed Java but &lt;code&gt;keytool&lt;/code&gt; still doesn’t work, you need to add it to your PATH.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Press &lt;strong&gt;Win + S&lt;/strong&gt; → search &lt;strong&gt;Environment Variables&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Edit the system environment variables&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Environment Variables&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;System Variables&lt;/strong&gt;, find &lt;strong&gt;Path&lt;/strong&gt; → click &lt;strong&gt;Edit&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add the JDK’s &lt;code&gt;bin&lt;/code&gt; directory:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Program Files\Java\jdk-17\bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Restart CMD/PowerShell&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;keytool &lt;span class="nt"&gt;-help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it outputs help text — you're ready!&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;5. Generate the JKS File (Non-Interactive Command)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Navigate to your project directory. Example:&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="nb"&gt;cd &lt;/span&gt;D:&lt;span class="se"&gt;\v&lt;/span&gt;scodeProjects&lt;span class="se"&gt;\g&lt;/span&gt;oalkings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run this command exactly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;keytool &lt;span class="nt"&gt;-genkeypair&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nt"&gt;-keystore&lt;/span&gt; goalkings.jks &lt;span class="nt"&gt;-storepass&lt;/span&gt; goalkings &lt;span class="nt"&gt;-keypass&lt;/span&gt; goalkings &lt;span class="nt"&gt;-keyalg&lt;/span&gt; RSA &lt;span class="nt"&gt;-keysize&lt;/span&gt; 2048 &lt;span class="nt"&gt;-validity&lt;/span&gt; 10000 &lt;span class="nt"&gt;-alias&lt;/span&gt; goalkings &lt;span class="nt"&gt;-dname&lt;/span&gt; &lt;span class="s2"&gt;"CN=Goalkings, OU=IT, O=Goalkings Ltd, L=Nairobi, S=Nairobi, C=KE"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✔ No prompts&lt;br&gt;
✔ No questions&lt;br&gt;
✔ Generates &lt;code&gt;goalkings.jks&lt;/code&gt; instantly&lt;/p&gt;

&lt;p&gt;Your keystore will now appear inside the current directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D:\vscodeProjects\goalkings\goalkings.jks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  &lt;strong&gt;6. Verify the Keystore&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Check that everything was created correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;keytool &lt;span class="nt"&gt;-list&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nt"&gt;-keystore&lt;/span&gt; goalkings.jks &lt;span class="nt"&gt;-storepass&lt;/span&gt; goalkings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This displays:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;alias name&lt;/li&gt;
&lt;li&gt;fingerprints&lt;/li&gt;
&lt;li&gt;key algorithm&lt;/li&gt;
&lt;li&gt;creation date&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;7. Create a key.properties File (Android)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Inside your Android project root, create:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;code&gt;key.properties&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;storePassword&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;goalkings&lt;/span&gt;
&lt;span class="py"&gt;keyPassword&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;goalkings&lt;/span&gt;
&lt;span class="py"&gt;keyAlias&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;goalkings&lt;/span&gt;
&lt;span class="py"&gt;storeFile&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;goalkings.jks&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file is used by your &lt;code&gt;build.gradle&lt;/code&gt; for signing.&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;8. Example &lt;code&gt;build.gradle&lt;/code&gt; Signing Setup&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Inside:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;android {
    ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;&lt;span class="kt"&gt;def&lt;/span&gt; &lt;span class="n"&gt;keystoreProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Properties&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="kt"&gt;def&lt;/span&gt; &lt;span class="n"&gt;keystorePropsFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rootProject&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"key.properties"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keystorePropsFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;exists&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;keystoreProps&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;load&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;FileInputStream&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keystorePropsFile&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;android&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;signingConfigs&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;release&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;storeFile&lt;/span&gt; &lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keystoreProps&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'storeFile'&lt;/span&gt;&lt;span class="o"&gt;])&lt;/span&gt;
            &lt;span class="n"&gt;storePassword&lt;/span&gt; &lt;span class="n"&gt;keystoreProps&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'storePassword'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;keyAlias&lt;/span&gt; &lt;span class="n"&gt;keystoreProps&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'keyAlias'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;keyPassword&lt;/span&gt; &lt;span class="n"&gt;keystoreProps&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'keyPassword'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;buildTypes&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;release&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;signingConfig&lt;/span&gt; &lt;span class="n"&gt;signingConfigs&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;release&lt;/span&gt;
            &lt;span class="n"&gt;minifyEnabled&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
            &lt;span class="n"&gt;shrinkResources&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;You have now:&lt;/p&gt;

&lt;p&gt;✔ Installed Java&lt;br&gt;
✔ Enabled &lt;code&gt;keytool&lt;/code&gt;&lt;br&gt;
✔ Generated a &lt;code&gt;.jks&lt;/code&gt; keystore &lt;em&gt;without Android Studio&lt;/em&gt;&lt;br&gt;
✔ Used predefined passwords &amp;amp; alias&lt;br&gt;
✔ Created a &lt;code&gt;key.properties&lt;/code&gt; file&lt;br&gt;
✔ Configured signing in Gradle&lt;/p&gt;

&lt;p&gt;This method works perfectly for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CI/CD pipelines&lt;/li&gt;
&lt;li&gt;Server builds&lt;/li&gt;
&lt;li&gt;Flutter projects&lt;/li&gt;
&lt;li&gt;React Native Android builds&lt;/li&gt;
&lt;li&gt;Lightweight development setups&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>mobile</category>
      <category>development</category>
      <category>java</category>
    </item>
    <item>
      <title>How to fix: “less than 1MB free space" Warning</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:45:32 +0000</pubDate>
      <link>https://dev.to/kkibet/how-to-fix-less-than-1mb-free-space-warning-4lhg</link>
      <guid>https://dev.to/kkibet/how-to-fix-less-than-1mb-free-space-warning-4lhg</guid>
      <description>&lt;p&gt;If your Windows laptop is showing &lt;strong&gt;“less than 1MB free space”&lt;/strong&gt; even though you’re sure there’s plenty of storage, here are possible causes and how to fix them:&lt;/p&gt;




&lt;h3&gt;
  
  
  🔍 &lt;strong&gt;1. Wrong Drive is Being Reported&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Check &lt;strong&gt;which drive&lt;/strong&gt; is showing that warning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It could be a &lt;strong&gt;recovery partition&lt;/strong&gt;, &lt;strong&gt;system reserved partition&lt;/strong&gt;, or &lt;strong&gt;external drive&lt;/strong&gt; with very little space.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open &lt;strong&gt;File Explorer → This PC&lt;/strong&gt; and look at each drive’s actual free space.&lt;/li&gt;
&lt;li&gt;Don’t worry if small system partitions are nearly full — that’s normal.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⚙️ &lt;strong&gt;2. File Explorer or Storage Info Glitch&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes Windows &lt;strong&gt;misreports space&lt;/strong&gt; due to a glitch or outdated cache.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restart your laptop.&lt;/li&gt;
&lt;li&gt;Then go to &lt;strong&gt;Settings → System → Storage&lt;/strong&gt; to see the real breakdown.&lt;/li&gt;
&lt;li&gt;Or run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  wmic logicaldisk get name,freespace,size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in &lt;strong&gt;Command Prompt&lt;/strong&gt; to view free space per drive.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛠️ &lt;strong&gt;3. Hidden Files or System Files Taking Up Space&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Space may be used by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pagefile&lt;/strong&gt;, &lt;strong&gt;hiberfil.sys&lt;/strong&gt;, &lt;strong&gt;System Restore points&lt;/strong&gt;, &lt;strong&gt;Windows Update Cache&lt;/strong&gt;, or &lt;strong&gt;Temporary files&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open &lt;strong&gt;Disk Cleanup&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for &lt;code&gt;Disk Cleanup&lt;/code&gt; in Start.&lt;/li&gt;
&lt;li&gt;Select your drive and clean up &lt;strong&gt;System files&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Or use:&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  cleanmgr /sageset:1
  cleanmgr /sagerun:1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🐛 &lt;strong&gt;4. Corrupted Disk or File System&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Corruption can make Windows think the drive is full.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;:&lt;br&gt;
Run CHKDSK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chkdsk C: /f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It may ask to restart — allow it.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 &lt;strong&gt;5. Malware or Disk-Filling Bugs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Some malware or faulty apps fill your drive with logs or junk files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run a scan with &lt;strong&gt;Windows Defender&lt;/strong&gt; or &lt;strong&gt;Malwarebytes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;%TEMP%&lt;/code&gt; folder and delete everything in it.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧰 Useful Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;WinDirStat&lt;/strong&gt; or &lt;strong&gt;TreeSize Free&lt;/strong&gt; to see where your storage is going visually.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>beginners</category>
      <category>hardware</category>
      <category>help</category>
    </item>
    <item>
      <title>How to Safely Roll Back to a Specific Git Commit in Your Local Project</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:42:06 +0000</pubDate>
      <link>https://dev.to/kkibet/how-to-safely-roll-back-to-a-specific-git-commit-in-your-local-project-2ecl</link>
      <guid>https://dev.to/kkibet/how-to-safely-roll-back-to-a-specific-git-commit-in-your-local-project-2ecl</guid>
      <description>&lt;p&gt;Mistakes happen — maybe you pushed the wrong changes, introduced a bug, or simply want to go back to a cleaner point in your project. The good news? Git makes it easy to roll back to a previous commit without panic. In this guide, I'll walk you through exactly how to return your local Git project to an earlier commit safely, depending on whether you want to keep or discard your recent changes.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔍 &lt;strong&gt;Understanding Git Reset Options&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before rolling back, it’s important to understand the three main types of Git resets. Each determines what happens to your working directory and staged files.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;1. Soft Reset — Undo a Commit but Keep All Your Changes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you only want to move the commit pointer backwards but keep your files staged for re-commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--soft&lt;/span&gt; &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When to Use:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You mistakenly made a commit too early.&lt;/li&gt;
&lt;li&gt;You want to combine commits or tidy your history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your files remain intact — only the commit is undone.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;2. Mixed Reset — Keep Changes but Unstage Them&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is the &lt;strong&gt;default reset mode&lt;/strong&gt; and the most commonly used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--mixed&lt;/span&gt; &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When to Use:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You want to undo commits but still keep the changes in your files.&lt;/li&gt;
&lt;li&gt;You prefer to re-stage the changes manually.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your working directory stays the same; your staging area is cleared.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3. Hard Reset — Completely Discard All Changes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you want to fully roll back and wipe out all changes made after a certain commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When to Use:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You want a clean reset.&lt;/li&gt;
&lt;li&gt;You’re sure you don’t need any recent changes.&lt;/li&gt;
&lt;li&gt;Your local branch is a mess and you want to start fresh from a known good state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; This permanently deletes all uncommitted changes. Use this only if you're absolutely sure.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔎 How to Get the Commit Hash
&lt;/h2&gt;

&lt;p&gt;Before using any reset command, find the commit you want to roll back to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--oneline&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;abc1234 Fix login bug
def5678 Add new payment system
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the hash (e.g., &lt;code&gt;abc1234&lt;/code&gt;) and use it with your reset command.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Rolling Back After You’ve Already Pushed
&lt;/h2&gt;

&lt;p&gt;If the commit is already pushed to a remote branch and you're sure you want to rewrite history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin &amp;lt;branch-name&amp;gt; &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Use with caution. Force-pushing can overwrite others’ work.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Rolling back to a specific commit doesn’t have to be scary. Git gives you powerful tools to safely undo mistakes — as long as you pick the right type of reset for your situation. Whether you want to keep your changes, clean your entire working directory, or just tidy up your history, these commands give you full control.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>githubactions</category>
      <category>cli</category>
    </item>
    <item>
      <title>How to Safely Clear System Cache Using the Terminal: A Simple Guide</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:36:54 +0000</pubDate>
      <link>https://dev.to/kkibet/how-to-safely-clear-system-cache-using-the-terminal-a-simple-guide-46b5</link>
      <guid>https://dev.to/kkibet/how-to-safely-clear-system-cache-using-the-terminal-a-simple-guide-46b5</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What Is System Cache?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;System cache consists of temporary files created by your operating system and apps. These files improve performance, but over time they accumulate and can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take up storage,&lt;/li&gt;
&lt;li&gt;Slow down the system,&lt;/li&gt;
&lt;li&gt;Cause outdated or corrupted cache-related issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clearing cache doesn’t delete personal files; it only removes temporary system files.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Clearing System Cache: Conversation Breakdown&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Alex’s First Question: “How do I clear cache from the terminal?”&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sam explains that cache clearing depends on your operating system. Below are the correct terminal commands per OS.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Linux: Clear System File Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Linux makes it easy to clear memory cache using the terminal without deleting actual files.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;To clear pagecache, dentries, and inode caches:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo sync
echo &lt;/span&gt;3 | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /proc/sys/vm/drop_caches
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This frees RAM by clearing cached filesystem data. It is safe and widely used by system administrators.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;One-line command:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;macOS: Clear System Cache&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;macOS stores various system, application, and user caches. You can safely remove them using:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Clear user-level cache:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Caches/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Clear system-level cache:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /Library/Caches/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Restart after clearing cache:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;shutdown &lt;span class="nt"&gt;-r&lt;/span&gt; now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A reboot ensures macOS rebuilds fresh cache files.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Windows: Clearing System Cache via Command Line&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Windows uses multiple cache locations. Here’s how to clear the most important ones:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Clear Temp folder:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;del /q /f /s %TEMP%\*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Clear Prefetch cache:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;del /q /f /s C:\Windows\Prefetch\*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Clear Windows Update cache:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;net stop wuauserv
del /q /f /s C:\Windows\SoftwareDistribution\Download\*
net start wuauserv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use built-in Disk Cleanup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cleanmgr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;Alex’s Final Question: “Does Disk Cleanup (cleanmgr) delete actual files?”&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sam clarifies:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Yes, Disk Cleanup &lt;em&gt;can&lt;/em&gt; delete files — but only safe temporary files.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It removes things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temporary system files&lt;/li&gt;
&lt;li&gt;Recycle Bin contents&lt;/li&gt;
&lt;li&gt;Thumbnail cache&lt;/li&gt;
&lt;li&gt;Windows Update leftovers&lt;/li&gt;
&lt;li&gt;System error logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You manually check what you want to delete. Nothing is deleted unless you confirm it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Important Warning:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Avoid deleting &lt;strong&gt;Previous Windows installation&lt;/strong&gt;, unless you’re sure you don’t need to roll back a system update.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Clearing system cache is a safe and effective way to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free disk space&lt;/li&gt;
&lt;li&gt;Fix software glitches&lt;/li&gt;
&lt;li&gt;Speed up your machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just make sure you use the correct commands for your operating system, and always double-check before deleting anything.&lt;/p&gt;

&lt;p&gt;Whether you're like &lt;strong&gt;Alex&lt;/strong&gt;, curious about how things work, or like &lt;strong&gt;Sam&lt;/strong&gt;, someone who assists others through technical issues, clearing cache via the terminal is a powerful skill every computer user should know.&lt;/p&gt;




</description>
      <category>cli</category>
      <category>systems</category>
      <category>vscode</category>
      <category>terminal</category>
    </item>
    <item>
      <title>📦 Managing Multiple Projects in One Repository: Submodules, Subtrees, Monorepos &amp; Partial Cloning Explained</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:27:57 +0000</pubDate>
      <link>https://dev.to/k-kibet/managing-multiple-projects-in-one-repository-submodules-subtrees-monorepos-partial-cloning-21mc</link>
      <guid>https://dev.to/k-kibet/managing-multiple-projects-in-one-repository-submodules-subtrees-monorepos-partial-cloning-21mc</guid>
      <description>&lt;p&gt;Modern software development often involves several related projects that need to live together—perhaps a shared library, a mobile app, an admin dashboard, and a backend API. Managing these independently while keeping them organized in a single place requires the right Git strategy.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll explore &lt;strong&gt;four powerful approaches&lt;/strong&gt; to organizing multiple projects under one repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Git Submodules&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git Subtrees&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monorepo structure&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Partial cloning using sparse-checkout&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each technique has its strengths and ideal use cases. Let’s break them down with clear examples.&lt;/p&gt;




&lt;h1&gt;
  
  
  🔧 &lt;strong&gt;1. Git Submodules — Independent Projects Inside a Parent Repository&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Git submodules let you embed separate Git repositories inside a parent repository. Each submodule maintains its own commit history and remote origin.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ When to Use Submodules
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When projects must remain completely independent&lt;/li&gt;
&lt;li&gt;When you want separate version control per project&lt;/li&gt;
&lt;li&gt;When reused modules belong in multiple repositories&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📌 Example Use Case
&lt;/h3&gt;

&lt;p&gt;Main project: &lt;code&gt;mega-suite&lt;/code&gt;&lt;br&gt;
Submodules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ui-engine&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data-analyzer&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📥 Adding a Submodule
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git submodule add https://github.com/example/ui-engine.git modules/ui-engine
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Added ui-engine as submodule"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;.gitmodules&lt;/code&gt; file that tracks submodule entries.&lt;/p&gt;

&lt;h3&gt;
  
  
  ▶ Initialize &amp;amp; Update Submodules
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git submodule update &lt;span class="nt"&gt;--init&lt;/span&gt; &lt;span class="nt"&gt;--recursive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🔄 Working Inside a Submodule
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;modules/ui-engine
git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  💡 Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Clean separation&lt;/li&gt;
&lt;li&gt;Reusable modules&lt;/li&gt;
&lt;li&gt;Independent version history&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠ Limitations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Can confuse beginners&lt;/li&gt;
&lt;li&gt;Requires extra commands to sync&lt;/li&gt;
&lt;li&gt;Submodules can break if misconfigured&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🌳 &lt;strong&gt;2. Git Subtrees — Embed Projects Without Complexity&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Git subtrees merge another repository &lt;strong&gt;into a folder&lt;/strong&gt; inside your repo—without the extra complexity of submodules.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ When to Use Subtrees
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you want all code in one repo&lt;/li&gt;
&lt;li&gt;But still want to pull updates from external repos&lt;/li&gt;
&lt;li&gt;And you don’t want the overhead of submodules&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📌 Example Use Case
&lt;/h3&gt;

&lt;p&gt;Main repository: &lt;code&gt;mega-suite&lt;/code&gt;&lt;br&gt;
Subtree projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ui-engine&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data-analyzer&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ➕ Add a Subtree
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add ui-engine https://github.com/example/ui-engine.git
git subtree add &lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;modules/ui-engine ui-engine main &lt;span class="nt"&gt;--squash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🔄 Updating the Subtree
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git subtree pull &lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;modules/ui-engine ui-engine main &lt;span class="nt"&gt;--squash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  💡 Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Everything stored inside one repo&lt;/li&gt;
&lt;li&gt;No special clone commands&lt;/li&gt;
&lt;li&gt;Easier than submodules&lt;/li&gt;
&lt;li&gt;No detached HEAD issues&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠ Limitations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Repo size grows faster&lt;/li&gt;
&lt;li&gt;No true isolation between projects&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🏢 &lt;strong&gt;3. Monorepos — A Single Repo for Multiple Projects&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;A &lt;strong&gt;monorepo&lt;/strong&gt; is a repository where all projects live together—even if they are unrelated. Big companies like Google, Meta, and Microsoft use monorepos to streamline development.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ When to Use a Monorepo
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When projects depend on each other&lt;/li&gt;
&lt;li&gt;When you want shared tooling and libraries&lt;/li&gt;
&lt;li&gt;When you want centralized versioning&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📁 Example Monorepo Structure:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mega-suite/
├── apps/
│   ├── dashboard/
│   └── mobile/
├── services/
│   ├── auth-service/
│   └── billing-service/
└── shared/
    ├── ui-kit/
    └── utils/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  💡 Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Easy refactoring across multiple projects&lt;/li&gt;
&lt;li&gt;Shared code lives in one place&lt;/li&gt;
&lt;li&gt;One repository to maintain&lt;/li&gt;
&lt;li&gt;Unified versioning&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠ Limitations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Repo can grow very large&lt;/li&gt;
&lt;li&gt;Requires tooling (NX, Lerna, Turborepo)&lt;/li&gt;
&lt;li&gt;Requires discipline to maintain structure&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  📥 &lt;strong&gt;4. Partial Cloning — Clone Only the Project You Need&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Partial cloning (via &lt;strong&gt;sparse-checkout&lt;/strong&gt;) allows users to clone only specific folders instead of the entire repository. This is perfect for monorepos.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ When to Use Sparse-Checkout / Partial Cloning
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Repo is too large&lt;/li&gt;
&lt;li&gt;Developers work on only one project&lt;/li&gt;
&lt;li&gt;You want to save disk space and bandwidth&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📌 Example Setup
&lt;/h3&gt;

&lt;p&gt;Monorepo: &lt;code&gt;mega-suite&lt;/code&gt;&lt;br&gt;
Folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;apps/dashboard&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;apps/mobile&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧩 Clone Repo Without Checkout
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &lt;span class="nt"&gt;--no-checkout&lt;/span&gt; https://github.com/example/mega-suite.git
&lt;span class="nb"&gt;cd &lt;/span&gt;mega-suite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🔧 Initialize Sparse Checkout
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git sparse-checkout init
git sparse-checkout &lt;span class="nb"&gt;set &lt;/span&gt;apps/dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ▶ Checkout Files
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now only the &lt;strong&gt;dashboard&lt;/strong&gt; project is downloaded!&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Works perfectly with monorepos&lt;/li&gt;
&lt;li&gt;Saves disk space&lt;/li&gt;
&lt;li&gt;Developers download only what they need&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠ Limitations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Requires Git 2.25+&lt;/li&gt;
&lt;li&gt;Adds a bit of setup complexity&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🎯 &lt;strong&gt;Which Approach Should You Choose?&lt;/strong&gt;
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Best Method&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Projects must remain fully independent&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Submodules&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want all code in one repo but keep external sources&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Subtrees&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiple related apps/libraries in one place&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Monorepo&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only need to clone specific folders&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Partial cloning&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  🚀 &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Organizing multiple projects under one Git repository isn’t one-size-fits-all. Each method—submodules, subtrees, monorepos, and partial cloning—serves a different purpose.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For strict independence → &lt;strong&gt;Submodules&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For simpler integration → &lt;strong&gt;Subtrees&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For large ecosystems → &lt;strong&gt;Monorepos&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For large repos requiring selective cloning → &lt;strong&gt;Partial cloning&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick the strategy that fits your workflow and scale your projects with confidence.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>cli</category>
      <category>docker</category>
    </item>
    <item>
      <title>How to Wipe Your Git History: A Complete Guide to Removing All Previous Commits</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 06:20:38 +0000</pubDate>
      <link>https://dev.to/kkibet/how-to-wipe-your-git-history-a-complete-guide-to-removing-all-previous-commits-1gk7</link>
      <guid>https://dev.to/kkibet/how-to-wipe-your-git-history-a-complete-guide-to-removing-all-previous-commits-1gk7</guid>
      <description>&lt;p&gt;Have you ever found yourself in a situation where your Git repository's history has become messy, cluttered, or contains sensitive information that needs to be completely removed? Whether you're starting fresh, cleaning up a project, or need to remove committed secrets, there are times when you need to nuclear option: removing all previous commits entirely.&lt;/p&gt;

&lt;p&gt;In this comprehensive guide, we'll explore several methods to wipe your Git history while preserving your current files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Would You Want to Remove All Commits?
&lt;/h2&gt;

&lt;p&gt;Before we dive into the methods, let's understand common scenarios where this might be necessary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accidental commits of sensitive data&lt;/strong&gt; (API keys, passwords, credentials)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Starting a fresh history&lt;/strong&gt; for a new project phase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleaning up a messy commit history&lt;/strong&gt; beyond repair&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removing large files&lt;/strong&gt; that are bloating your repository size&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preparing a template repository&lt;/strong&gt; for public release&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚠️ Important Warning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;These operations are destructive and cannot be undone!&lt;/strong&gt; Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backup your repository before proceeding&lt;/li&gt;
&lt;li&gt;Communicate with your team if this is a shared repository&lt;/li&gt;
&lt;li&gt;Understand that you'll lose all commit history, tags, and branches&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Method 1: The Orphan Branch Approach (Recommended)
&lt;/h2&gt;

&lt;p&gt;This is the safest method that keeps all your current files intact while creating a completely fresh history.&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;# Step 1: Create a new orphan branch (no parent, no history)&lt;/span&gt;
git checkout &lt;span class="nt"&gt;--orphan&lt;/span&gt; new-branch

&lt;span class="c"&gt;# Step 2: Add all current files to staging&lt;/span&gt;
git add &lt;span class="nt"&gt;-A&lt;/span&gt;

&lt;span class="c"&gt;# Step 3: Create your new initial commit&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit - fresh start"&lt;/span&gt;

&lt;span class="c"&gt;# Step 4: Delete the old main branch&lt;/span&gt;
git branch &lt;span class="nt"&gt;-D&lt;/span&gt; main

&lt;span class="c"&gt;# Step 5: Rename current branch to main&lt;/span&gt;
git branch &lt;span class="nt"&gt;-m&lt;/span&gt; main

&lt;span class="c"&gt;# Step 6: Force push to update remote repository&lt;/span&gt;
git push &lt;span class="nt"&gt;-f&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use this method:&lt;/strong&gt; This is your go-to approach for most situations. It's clean, straightforward, and preserves all your current work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Nuclear Option - Complete Reinitialization
&lt;/h2&gt;

&lt;p&gt;This method completely wipes everything and starts from scratch. Use this when you want the absolute cleanest slate.&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;# Step 1: Remove the entire .git directory&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; .git

&lt;span class="c"&gt;# Step 2: Reinitialize git&lt;/span&gt;
git init

&lt;span class="c"&gt;# Step 3: Set up your user configuration&lt;/span&gt;
git config user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config user.email &lt;span class="s2"&gt;"your@email.com"&lt;/span&gt;

&lt;span class="c"&gt;# Step 4: Add files and create initial 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 commit"&lt;/span&gt;

&lt;span class="c"&gt;# Step 5: Reconnect to remote repository&lt;/span&gt;
git remote add origin &amp;lt;your-remote-url&amp;gt;
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use this method:&lt;/strong&gt; When you want to completely reset everything, including git configuration, or when dealing with repository corruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 3: Git Reset Approach
&lt;/h2&gt;

&lt;p&gt;This method uses Git's internal commands to reset the repository to before the first commit.&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;# Step 1: Remove HEAD reference&lt;/span&gt;
git update-ref &lt;span class="nt"&gt;-d&lt;/span&gt; HEAD

&lt;span class="c"&gt;# Step 2: Add and commit files&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 commit"&lt;/span&gt;

&lt;span class="c"&gt;# Step 3: Force push to remote&lt;/span&gt;
git push &lt;span class="nt"&gt;-f&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use this method:&lt;/strong&gt; When you prefer using core Git commands and want to keep the existing repository configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling Remote Repositories
&lt;/h2&gt;

&lt;p&gt;If you're working with a remote repository (GitHub, GitLab, etc.), you'll need to force push after cleaning your local history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-f&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-f&lt;/code&gt; (force) flag is necessary because your local history no longer matches the remote history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices and Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Check for Sensitive Data First&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before proceeding, ensure you're not just removing history but actually eliminating sensitive information:&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;# Search for potential secrets in your history&lt;/span&gt;
git log &lt;span class="nt"&gt;-p&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"password&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;key&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;secret"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Update All Branches&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you have multiple branches, you'll need to clean them up too or delete them:&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;# List all branches&lt;/span&gt;
git branch &lt;span class="nt"&gt;-a&lt;/span&gt;

&lt;span class="c"&gt;# Delete old branches&lt;/span&gt;
git branch &lt;span class="nt"&gt;-D&lt;/span&gt; branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Clean Up Tags&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Tags will also be removed with your history. If you need to preserve them, consider:&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;# List all tags&lt;/span&gt;
git tag

&lt;span class="c"&gt;# Re-tag after cleanup if necessary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Notify Your Team&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If this is a shared repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coordinate with your team&lt;/li&gt;
&lt;li&gt;Have everyone clone the fresh repository&lt;/li&gt;
&lt;li&gt;Ensure no one has local changes that haven't been pushed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Alternative: Rebasing Instead of Nuclear Option
&lt;/h2&gt;

&lt;p&gt;Before taking the drastic step of removing all history, consider if interactive rebase might solve your problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="nt"&gt;--root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows you to squash, edit, or drop commits while preserving some history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Removing all Git commits is a powerful but dangerous operation. The orphan branch method (Method 1) is generally recommended for most use cases as it preserves your current working files while giving you a clean history slate.&lt;/p&gt;

&lt;p&gt;Remember: with great power comes great responsibility. Use these commands carefully, always maintain backups, and communicate changes with your team when working on shared repositories.&lt;/p&gt;

&lt;p&gt;Have you ever needed to wipe your Git history? Share your experiences or questions in the comments below!&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>development</category>
      <category>cli</category>
    </item>
    <item>
      <title>Solving Git Authentication Failures: "Password authentication is not supported" Error</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 05:50:22 +0000</pubDate>
      <link>https://dev.to/kkibet/solving-git-authentication-failures-password-authentication-is-not-supported-error-n96</link>
      <guid>https://dev.to/kkibet/solving-git-authentication-failures-password-authentication-is-not-supported-error-n96</guid>
      <description>&lt;p&gt;If you've recently encountered the frustrating error message &lt;strong&gt;"Password authentication is not supported for Git operations"&lt;/strong&gt; when trying to clone a repository, you're not alone. This common issue stems from GitHub's decision to deprecate password-based authentication for Git operations. But don't worry – I'll walk you through several effective solutions to get you back to coding in no time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Error
&lt;/h2&gt;

&lt;p&gt;Here's what you might be seeing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to clone source: Clone error: 
Cloning into bare repository './git-data/source.git'...
remote: Invalid username or token. 
Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/username/repo.git/'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This error occurs because GitHub no longer accepts account passwords when authenticating Git operations. The platform made this change to enhance security, pushing users toward more secure authentication methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solutions: From Quick Fixes to Best Practices
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Use Personal Access Tokens (PAT) - Quick HTTPS Solution&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Personal Access Tokens are the modern replacement for passwords in HTTPS cloning:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-by-step:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)&lt;/li&gt;
&lt;li&gt;Click "Generate new token" and select "Generate new token (classic)"&lt;/li&gt;
&lt;li&gt;Give it a descriptive name and set an expiration date&lt;/li&gt;
&lt;li&gt;Select the appropriate scopes (typically &lt;code&gt;repo&lt;/code&gt; for full repository access)&lt;/li&gt;
&lt;li&gt;Generate the token and &lt;strong&gt;copy it immediately&lt;/strong&gt; (you won't see it again!)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://username:TOKEN@github.com/kkibetkkorir/goal-genius-newUI-updated.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or configure Git to use your token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper cache
&lt;span class="c"&gt;# Then on your next operation, use the token as your password&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Switch to SSH Authentication (Recommended Long-term Solution)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SSH keys provide a more secure and convenient authentication method:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting up SSH:&lt;/strong&gt;&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;# Generate a new SSH key&lt;/span&gt;
ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;

&lt;span class="c"&gt;# Start the SSH agent&lt;/span&gt;
&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# Add your SSH key to the agent&lt;/span&gt;
ssh-add ~/.ssh/id_ed25519
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add the public key to GitHub:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy your public key: &lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to GitHub Settings → SSH and GPG keys → New SSH key&lt;/li&gt;
&lt;li&gt;Paste your public key and give it a descriptive title&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Clone using SSH:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.com:kkibetkkorir/goal-genius-newUI-updated.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Git Credential Manager - Set It and Forget It&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you're tired of constantly entering credentials:&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;# Cache credentials for 15 minutes&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper cache

&lt;span class="c"&gt;# Or store them indefinitely (use with caution)&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper &lt;span class="s1"&gt;'store --file ~/.my-credentials'&lt;/span&gt;

&lt;span class="c"&gt;# On Windows, use the Credential Manager&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper manager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Check for IP Allowlisting Issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The error message might mention IP allowlisting if you're working within an organization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify your organization's IP restrictions&lt;/li&gt;
&lt;li&gt;Check if your current IP address is whitelisted&lt;/li&gt;
&lt;li&gt;Use a VPN to connect from an approved network if necessary&lt;/li&gt;
&lt;li&gt;Contact your IT department for the allowed IP ranges&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;CI/CD and Automated Environments&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For automated scripts and CI/CD pipelines:&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;# Use environment variables&lt;/span&gt;
git clone https://&lt;span class="nv"&gt;$GITHUB_TOKEN&lt;/span&gt;@github.com/username/repo.git

&lt;span class="c"&gt;# Or use the built-in GITHUB_TOKEN in GitHub Actions&lt;/span&gt;
- uses: actions/checkout@v3
  with:
    token: &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="p"&gt;{ secrets.GITHUB_TOKEN &lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practices for Different Scenarios
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For personal projects:&lt;/strong&gt; SSH keys offer the best balance of security and convenience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For shared computers:&lt;/strong&gt; Use Personal Access Tokens with limited scopes and reasonable expiration dates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For CI/CD systems:&lt;/strong&gt; Use fine-grained tokens with minimal required permissions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For organizations:&lt;/strong&gt; Implement SSH keys with mandatory passphrases for additional security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting Common Issues
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Permission denied" with SSH?&lt;/strong&gt; Ensure your SSH key is added to the ssh-agent and GitHub&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token not working?&lt;/strong&gt; Check if the token has expired or has insufficient permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Still having issues?&lt;/strong&gt; Verify repository existence and your access permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Change Matters
&lt;/h2&gt;

&lt;p&gt;GitHub's move away from password authentication is part of a broader industry shift toward more secure authentication methods. Passwords are vulnerable to brute-force attacks and phishing, while tokens and SSH keys provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better security through scoped permissions&lt;/li&gt;
&lt;li&gt;The ability to revoke access without changing your password&lt;/li&gt;
&lt;li&gt;More granular control over what each token can access&lt;/li&gt;
&lt;li&gt;Reduced risk in case of credential leaks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;While the transition away from password authentication might cause temporary frustration, the security benefits are well worth it. Setting up proper authentication now will save you from future headaches and keep your code more secure.&lt;/p&gt;

&lt;p&gt;Have you encountered this error? Which solution worked best for you? Share your experiences in the comments below!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Once you've set up SSH authentication or Personal Access Tokens, you'll likely find them more convenient than passwords in the long run. Happy coding! 🚀&lt;/p&gt;

</description>
      <category>security</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Complete Guide to Working with Single Folders in Multi-Project GitHub Repositories</title>
      <dc:creator>K-kibet</dc:creator>
      <pubDate>Mon, 17 Nov 2025 05:46:44 +0000</pubDate>
      <link>https://dev.to/kkibet/the-complete-guide-to-working-with-single-folders-in-multi-project-github-repositories-2ed5</link>
      <guid>https://dev.to/kkibet/the-complete-guide-to-working-with-single-folders-in-multi-project-github-repositories-2ed5</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical guide to cloning, modifying, and pushing changes to specific folders in monorepos without dealing with unrelated projects&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Have you ever encountered a GitHub repository that contains multiple projects, but you only need to work on one specific folder? Maybe it's a company monorepo with dozens of projects, or an open-source repository with various examples and tools. Downloading the entire repository when you only care about one project feels inefficient and cumbersome.&lt;/p&gt;

&lt;p&gt;In this comprehensive guide, I'll show you exactly how to work with single folders in multi-project repositories—from initial clone to final push—without the overhead of dealing with unrelated projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Challenge
&lt;/h2&gt;

&lt;p&gt;Many organizations use monorepos (single repositories containing multiple projects) for better code sharing, dependency management, and collaboration. However, as a developer, you might only need to work on one specific project within that repository.&lt;/p&gt;

&lt;p&gt;The challenge is threefold:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cloning only the folder you need&lt;/li&gt;
&lt;li&gt;Making changes in isolation&lt;/li&gt;
&lt;li&gt;Pushing back changes without affecting other projects&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Method 1: Sparse Checkout (Recommended Approach)
&lt;/h2&gt;

&lt;p&gt;This is the most reliable method for working with single folders while maintaining full git functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Clone Only Your Target Folder
&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 directory for your work&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-project &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-project

&lt;span class="c"&gt;# Initialize git repository&lt;/span&gt;
git init

&lt;span class="c"&gt;# Add the remote repository&lt;/span&gt;
git remote add origin https://github.com/username/multi-project-repo.git

&lt;span class="c"&gt;# Enable sparse checkout&lt;/span&gt;
git config core.sparseCheckout &lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# Specify EXACTLY which folder you want&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"project-a/*"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .git/info/sparse-checkout

&lt;span class="c"&gt;# Fetch and checkout only your specified folder&lt;/span&gt;
git fetch &lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 origin main
git checkout origin/main
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Verify Your Setup
&lt;/h3&gt;

&lt;p&gt;Check that you only have the files you need:&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;# List all tracked files - should only show your project folder&lt;/span&gt;
git ls-files

&lt;span class="c"&gt;# Check current status&lt;/span&gt;
git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should only see files from your target folder (e.g., &lt;code&gt;project-a/&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Quick Sparse Clone with Filter
&lt;/h2&gt;

&lt;p&gt;For a more streamlined approach:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &lt;span class="nt"&gt;--filter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;blob:none &lt;span class="nt"&gt;--no-checkout&lt;/span&gt; https://github.com/username/multi-project-repo.git
&lt;span class="nb"&gt;cd &lt;/span&gt;multi-project-repo
git sparse-checkout init &lt;span class="nt"&gt;--cone&lt;/span&gt;
git sparse-checkout &lt;span class="nb"&gt;set &lt;/span&gt;project-a
git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Making Changes in Isolation
&lt;/h2&gt;

&lt;p&gt;Now you can work on your project without worrying about other folders:&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;# Navigate to your project&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;project-a

&lt;span class="c"&gt;# Make your changes - edit files, add new ones, etc.&lt;/span&gt;
&lt;span class="c"&gt;# The rest of the repository doesn't exist in your workspace&lt;/span&gt;

&lt;span class="c"&gt;# Create new files&lt;/span&gt;
&lt;span class="nb"&gt;touch &lt;/span&gt;new-feature.js

&lt;span class="c"&gt;# Edit existing files&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"// New functionality"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; existing-file.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pushing Changes Back to the Specific Folder
&lt;/h2&gt;

&lt;p&gt;This is where many developers get nervous—but the process is straightforward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Stage Your Changes Carefully
&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;# Check what will be committed&lt;/span&gt;
git status

&lt;span class="c"&gt;# Add all changes in your project folder&lt;/span&gt;
git add &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;# Verify only your project files are staged&lt;/span&gt;
git diff &lt;span class="nt"&gt;--staged&lt;/span&gt; &lt;span class="nt"&gt;--name-only&lt;/span&gt;
&lt;span class="c"&gt;# Should only show files in project-a/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Commit with a Descriptive Message
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"project-a: Added new authentication features

- Implemented OAuth2 integration
- Added user session management
- Updated documentation"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;project-a:&lt;/code&gt; prefix in your commit message helps maintain clarity in the repository history.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Pull Latest Changes and Handle Conflicts
&lt;/h3&gt;

&lt;p&gt;Always pull before pushing to avoid conflicts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there are conflicts, they'll only occur in files within your project folder, since those are the only files you have.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Push Your Changes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Safety Checks and Best Practices
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pre-Push Verification Script
&lt;/h3&gt;

&lt;p&gt;Create a script to ensure you're only modifying your intended folder:&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;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# safe-push.sh&lt;/span&gt;

&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"project-a"&lt;/span&gt;  &lt;span class="c"&gt;# Change this to your folder&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Running safety checks..."&lt;/span&gt;

&lt;span class="c"&gt;# Check for files outside target directory&lt;/span&gt;
&lt;span class="nv"&gt;stray_files&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git ls-files &lt;span class="nt"&gt;--cached&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"^&lt;/span&gt;&lt;span class="nv"&gt;$PROJECT_DIR&lt;/span&gt;&lt;span class="s2"&gt;/"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;git"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$stray_files&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"ERROR: Found files outside &lt;/span&gt;&lt;span class="nv"&gt;$PROJECT_DIR&lt;/span&gt;&lt;span class="s2"&gt;:"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$stray_files&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Aborting push."&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# Check for unstaged changes&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; git diff &lt;span class="nt"&gt;--quiet&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Warning: You have unstaged changes."&lt;/span&gt;
    &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Continue anyway? (y/N): "&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 &lt;span class="nt"&gt;-r&lt;/span&gt;
    &lt;span class="nb"&gt;echo
    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nv"&gt;$REPLY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;~ ^[Yy]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;exit &lt;/span&gt;1
    &lt;span class="k"&gt;fi
fi

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Safety checks passed. Proceeding with push..."&lt;/span&gt;
git pull origin main
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Handling Common Issues
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: "Updates were rejected because the remote contains work you do not have locally"&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;# This happens when others modified files in your project folder&lt;/span&gt;
git pull origin main &lt;span class="nt"&gt;--allow-unrelated-histories&lt;/span&gt;
&lt;span class="c"&gt;# Resolve any conflicts, then push&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Accidentally staged files outside your project&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;# Unstage all files&lt;/span&gt;
git reset

&lt;span class="c"&gt;# Only stage files in your project folder&lt;/span&gt;
git add project-a/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Working with Multiple Related Folders
&lt;/h3&gt;

&lt;p&gt;If your project depends on shared utilities:&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;# Add additional folders to sparse checkout&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"shared-libraries/"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .git/info/sparse-checkout
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"common-config/"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .git/info/sparse-checkout
git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating Feature Branches
&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 feature branch&lt;/span&gt;
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; feature/new-authentication

&lt;span class="c"&gt;# Make changes, commit, and push&lt;/span&gt;
git push origin feature/new-authentication

&lt;span class="c"&gt;# Create PR on GitHub, then merge to main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why This Approach Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sparse Checkout&lt;/strong&gt;: Git only checks out the files you specify, but maintains awareness of the entire repository structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Pushing&lt;/strong&gt;: Git tracks what actually changed and only transmits those deltas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path-Based Operations&lt;/strong&gt;: Most git operations are path-aware, so pushing only affects the files you modified&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real-World Example: Company Monorepo
&lt;/h2&gt;

&lt;p&gt;Let's walk through a realistic scenario:&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;# Clone only the frontend project from company monorepo&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;company-frontend &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;company-frontend
git init
git remote add origin https://github.com/company/monorepo.git
git config core.sparseCheckout &lt;span class="nb"&gt;true
echo&lt;/span&gt; &lt;span class="s2"&gt;"apps/web-frontend/*"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .git/info/sparse-checkout
git fetch &lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 origin main
git checkout origin/main
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; main

&lt;span class="c"&gt;# Work on frontend changes&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;apps/web-frontend
&lt;span class="c"&gt;# ... make changes ...&lt;/span&gt;

&lt;span class="c"&gt;# Safely push back&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;"apps/web-frontend: Updated responsive design"&lt;/span&gt;
git pull origin main
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Benefits of This Workflow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Download Size&lt;/strong&gt;: Only get what you need&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Operations&lt;/strong&gt;: No unnecessary file processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focused Development&lt;/strong&gt;: No distractions from unrelated projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintained Collaboration&lt;/strong&gt;: Full compatibility with team workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety&lt;/strong&gt;: Little risk of accidentally modifying other projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Working with single folders in multi-project repositories doesn't require complex tools or risky procedures. With sparse checkout, you can efficiently collaborate on large monorepos while maintaining the focus and simplicity of working with a single project.&lt;/p&gt;

&lt;p&gt;The key takeaways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use sparse checkout to clone only what you need&lt;/li&gt;
&lt;li&gt;Always verify your changes before committing&lt;/li&gt;
&lt;li&gt;Pull before pushing to avoid conflicts&lt;/li&gt;
&lt;li&gt;Use descriptive commit messages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach gives you the best of both worlds: the collaboration benefits of monorepos with the focused workflow of single-project repositories.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Next time you face a massive repository, remember—you don't need to clone it all. Just take what you need and leave the rest.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
