<?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: Shawon Saha</title>
    <description>The latest articles on DEV Community by Shawon Saha (@shawon).</description>
    <link>https://dev.to/shawon</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F399456%2F87b0cbaa-1502-4945-9e07-aa6ff80420c7.png</url>
      <title>DEV Community: Shawon Saha</title>
      <link>https://dev.to/shawon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shawon"/>
    <language>en</language>
    <item>
      <title>The Ultimate Trick to Change Android Animation Scale with Developer Options DISABLED</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sat, 04 Jul 2026 10:15:26 +0000</pubDate>
      <link>https://dev.to/shawon/the-ultimate-trick-to-change-android-animation-scale-with-developer-options-disabled-26bg</link>
      <guid>https://dev.to/shawon/the-ultimate-trick-to-change-android-animation-scale-with-developer-options-disabled-26bg</guid>
      <description>&lt;p&gt;We’ve all done it: the very first thing you do when you get a new Android phone is unlock Developer Options and drop the animation scales from &lt;code&gt;1.0x&lt;/code&gt; to &lt;code&gt;0.5x&lt;/code&gt;. Instantly, your phone feels twice as fast. Apps snap open, multitasking feels fluid, and that artificial lag is completely gone.&lt;/p&gt;

&lt;p&gt;But then, you try to open your banking app, a high-security crypto wallet, or a sensitive work app, only to be met with a dreaded security warning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Security Risk Detected: Developer Options are enabled. Please disable them to use this app."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s an incredibly frustrating ultimatum. Do you choose a snappier, faster user interface, or do you choose being able to access your money on the go?&lt;/p&gt;

&lt;p&gt;Thankfully, you don't have to choose anymore. In this guide, we’re going to show you a permanent workaround using an open-source tool called &lt;strong&gt;CustomAnimator&lt;/strong&gt; by Ahmet Can Arslan. You will learn how to set a custom animation scale and &lt;strong&gt;completely turn off Developer Options&lt;/strong&gt; while keeping your lightning-fast UI.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Do Banking Apps Care About Developer Options?
&lt;/h2&gt;

&lt;p&gt;To understand why this workaround is so great, you have to understand the security risk. When Developer Options are left enabled, your device leaves the door open for USB Debugging (&lt;code&gt;adb&lt;/code&gt;). In the wrong hands, an authorized computer could sideload malware, extract app data, or simulate touches.&lt;/p&gt;

&lt;p&gt;To protect your financial data, banking apps simply look for the system flag &lt;code&gt;development_settings_enabled&lt;/code&gt;. If it’s on, they lock you out.&lt;/p&gt;

&lt;p&gt;Our goal is to change the animation settings directly inside Android's &lt;code&gt;Secure Settings&lt;/code&gt; layer, grant a tiny open-source app the right to handle it, and then flip that developer flag safely back to &lt;strong&gt;Off&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You Need
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;An Android phone.&lt;/li&gt;
&lt;li&gt;A computer (Windows, Mac, or Linux) and a USB cable.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;CustomAnimator&lt;/strong&gt; app installed on your phone. You can grab the APK directly from the &lt;a href="https://github.com/AhmetCanArslan/CustomAnimator" rel="noopener noreferrer"&gt;Official CustomAnimator GitHub Repository&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmif07fmhie6m0yklkqog.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmif07fmhie6m0yklkqog.jpg" alt="Custom Animator App Initial Screen" width="800" height="1516"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Prepare Your Android Device
&lt;/h2&gt;

&lt;p&gt;Before we touch the computer, we need to allow it to speak to your phone just this once.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On your phone, go to &lt;strong&gt;Settings &amp;gt; About Phone&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Find the &lt;strong&gt;Build Number&lt;/strong&gt; and tap it 7 times until it says &lt;em&gt;"You are now a developer!"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Go back to your main Settings, search for &lt;strong&gt;Developer Options&lt;/strong&gt;, and turn on &lt;strong&gt;USB Debugging&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Connect your phone to your computer using a reliable USB cable.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  ⚠️ Crucial Step for Brand-Specific Phones:
&lt;/h3&gt;

&lt;p&gt;Some manufacturers add extra security layers that block automated permission scripts. If you have one of these devices, change this setting before moving forward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OnePlus / Oppo / Realme (OxygenOS 16 / ColorOS):&lt;/strong&gt; Scroll to the very bottom of Developer Options and turn &lt;strong&gt;ON&lt;/strong&gt; &lt;strong&gt;"Disable system optimization"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Xiaomi / Poco / Redmi:&lt;/strong&gt; Turn &lt;strong&gt;ON&lt;/strong&gt; &lt;strong&gt;"USB debugging (Security settings)"&lt;/strong&gt; (right below the main USB debugging switch) and bypass the warning timers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 2: Install ADB on Your Computer
&lt;/h2&gt;

&lt;p&gt;Choose your computer's operating system below to get Android Platform Tools (ADB) running in seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  For macOS Users
&lt;/h3&gt;

&lt;p&gt;The fastest way to install ADB on a Mac is via Homebrew. Open your &lt;strong&gt;Terminal&lt;/strong&gt; app 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;brew &lt;span class="nb"&gt;install &lt;/span&gt;android-platform-tools

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(If you don't use Homebrew, download the official &lt;a href="https://developer.android.com/tools/releases/platform-tools" rel="noopener noreferrer"&gt;SDK Platform-Tools for Mac ZIP&lt;/a&gt;, extract it, and open Terminal inside that folder.)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  For Windows Users
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Download the official &lt;a href="https://developer.android.com/tools/releases/platform-tools" rel="noopener noreferrer"&gt;SDK Platform-Tools for Windows ZIP&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Extract the folder to an easy-to-find location (like &lt;code&gt;C:\platform-tools&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Click on your Windows start menu, type &lt;strong&gt;CMD&lt;/strong&gt; (Command Prompt), and open it.&lt;/li&gt;
&lt;li&gt;Point the command prompt to your folder by running:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd C:\platform-tools

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For Linux Users
&lt;/h3&gt;

&lt;p&gt;If you are on Linux, you can install ADB directly from your distribution's native package manager. Open your terminal and type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ubuntu/Debian:&lt;/strong&gt; &lt;code&gt;sudo apt install adb&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fedora:&lt;/strong&gt; &lt;code&gt;sudo dnf install android-tools&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arch Linux:&lt;/strong&gt; &lt;code&gt;sudo pacman -S android-tools&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 3: Link Your Computer and Phone
&lt;/h2&gt;

&lt;p&gt;With your terminal or command prompt open, let's verify the connection. Run the following command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mac &amp;amp; Linux:&lt;/strong&gt; &lt;code&gt;adb devices&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows (Command Prompt):&lt;/strong&gt; &lt;code&gt;adb devices&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows (PowerShell):&lt;/strong&gt; &lt;code&gt;.\adb devices&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Look at your phone's screen immediately. A popup will ask you to &lt;strong&gt;"Allow USB debugging?"&lt;/strong&gt;. Check the box for &lt;em&gt;Always allow from this computer&lt;/em&gt; and tap &lt;strong&gt;Allow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you run the command a second time, you should see your phone's serial number followed by the word &lt;code&gt;device&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Grant the Permanent Secure Permission
&lt;/h2&gt;

&lt;p&gt;Now we are going to use the Android Package Manager (&lt;code&gt;pm&lt;/code&gt;) to grant CustomAnimator the right to modify system animations without root access. Copy and paste the command for your OS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mac, Linux &amp;amp; Windows CMD:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb shell pm grant com.arslan.customanimator android.permission.WRITE_SECURE_SETTINGS

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows PowerShell:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\adb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;grant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com.arslan.customanimator&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android.permission.WRITE_SECURE_SETTINGS&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hit &lt;strong&gt;Enter&lt;/strong&gt;. If the terminal simply jumps down to a blank new line without showing any errors, &lt;strong&gt;it worked perfectly!&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Set Your Animations and Lock the Door!
&lt;/h2&gt;

&lt;p&gt;Now you can disconnect your phone from the computer. The hard work is done.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;CustomAnimator&lt;/strong&gt; app on your Android device.&lt;/li&gt;
&lt;li&gt;The permission error screen will be gone, replaced by a clean menu. You can now set your Window, Transition, and Animator scales exactly how you like them (e.g., &lt;code&gt;0.5&lt;/code&gt;, &lt;code&gt;0.25&lt;/code&gt;, or even completely custom values like &lt;code&gt;0.35&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Once your phone feels perfectly snappy, go to &lt;strong&gt;Settings &amp;gt; Developer Options&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Toggle the main "Developer Options" switch to OFF.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;(Note: If you had to toggle "Disable system optimization" or "USB Debugging Security Settings" in Step 1, turning off Developer Options will automatically safely revert those too).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fecaz8orouya8mext5pa9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fecaz8orouya8mext5pa9.jpg" alt="After Successful Setup Custom Animator" width="800" height="1478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Result?
&lt;/h3&gt;

&lt;p&gt;Open up your banking app, Google Pay, or your corporate email. They will read the system flag, see that Developer Options are completely disabled, and grant you full access instantly. Meanwhile, your underlying animation scales remain set exactly where CustomAnimator put them.&lt;/p&gt;

&lt;p&gt;You get a faster phone, maximum security, and zero app crashes. It’s the ultimate win-win for Android power users!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unlock the Hidden Power of Your Mac: Why You Aren't Using the Option Key Enough</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Thu, 25 Jun 2026 14:12:05 +0000</pubDate>
      <link>https://dev.to/shawon/unlock-the-hidden-power-of-your-mac-why-you-arent-using-the-option-key-enough-3fla</link>
      <guid>https://dev.to/shawon/unlock-the-hidden-power-of-your-mac-why-you-arent-using-the-option-key-enough-3fla</guid>
      <description>&lt;p&gt;We’ve all been there: you’re working on your Mac, clicking through menus, and thinking, &lt;em&gt;“There has to be a faster way to do this.”&lt;/em&gt; As it turns out, the answer has been sitting right under your fingertips the entire time. The &lt;strong&gt;Option key {⌥}&lt;/strong&gt; is easily one of the most underrated, underutilized tools on a Mac. While it might just look like a modifier key for typing special symbols, it actually unlocks a massive world of hidden features, deep system analytics, and lightning-fast workflows.&lt;/p&gt;

&lt;p&gt;If you want to save time and boost your daily productivity, here are the best hidden Option key shortcuts you need to start using right now.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Next-Level File Management in Finder
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Dynamic "Inspector" Window
&lt;/h3&gt;

&lt;p&gt;Normally, when you want to see a file's details, you right-click and select &lt;strong&gt;Get Info&lt;/strong&gt; (or press &lt;code&gt;Command + I&lt;/code&gt;). But if you select multiple files, your screen instantly gets cluttered with dozens of individual windows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Upgrade:&lt;/strong&gt; Press &lt;code&gt;Command + Option + I&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Why it’s better:&lt;/strong&gt; This opens a single, dynamic &lt;strong&gt;Inspector window&lt;/strong&gt;. Instead of opening new tabs, the Inspector automatically updates its information in real-time as you click through different files.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Permanent File Deletion
&lt;/h3&gt;

&lt;p&gt;Tired of dragging files to the Trash and having to empty it manually later to free up SSD space?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Upgrade:&lt;/strong&gt; Select your file and press &lt;code&gt;Command + Option + Delete&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; This completely bypasses the Trash and &lt;strong&gt;permanently deletes&lt;/strong&gt; the file immediately. Use it with caution, because there is no "undo" button here!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Desktop &amp;amp; Window Management Mastery
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Mass-Minimize Windows
&lt;/h3&gt;

&lt;p&gt;When your desktop becomes a chaotic mess of Safari windows, minimizing them one by one is incredibly tedious.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Shortcut:&lt;/strong&gt; Hold &lt;code&gt;Option&lt;/code&gt; while clicking the yellow &lt;strong&gt;minimize button&lt;/strong&gt; on the top-left of a window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; Every single open window of that specific app will minimize simultaneously in one quick swoop.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Instant "Focus Mode"
&lt;/h3&gt;

&lt;p&gt;If overlapping apps are distracting you and you need to focus entirely on just one (like the Notes app), you don't have to minimize everything else manually.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Shortcut:&lt;/strong&gt; Click the app you want to use, then press &lt;code&gt;Command + Option + H&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; This instantly hides every other background application, leaving only your active window visible.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Smart App Quit
&lt;/h3&gt;

&lt;p&gt;When you have dozens of browser tabs open for a massive research project, quitting the app (&lt;code&gt;Command + Q&lt;/code&gt;) usually means losing your spot or hoarding system RAM for days.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Shortcut:&lt;/strong&gt; Use &lt;code&gt;Command + Option + Q&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; This acts like a "pause" button. It safely shuts down the app to free up your system RAM, but when you reopen it, every single window and tab will restore exactly where you left off.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Bonus Tip:&lt;/strong&gt; Want to maximize a window to fill your screen &lt;em&gt;without&lt;/em&gt; entering Apple's rigid Full Screen mode? Hold &lt;code&gt;Option&lt;/code&gt; while clicking the green &lt;strong&gt;maximize button&lt;/strong&gt; in the top-left corner.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Secret Menu Bar Diagnostis
&lt;/h2&gt;

&lt;p&gt;Your Mac's menu bar holds deep, hidden secrets—all you have to do is hold &lt;code&gt;Option&lt;/code&gt; before you click:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Icon&lt;/th&gt;
&lt;th&gt;Normal Click&lt;/th&gt;
&lt;th&gt;Option + Click&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Wi-Fi Icon&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Shows available networks.&lt;/td&gt;
&lt;td&gt;Displays advanced connection parameters and troubleshooting metrics.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sound Icon&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Adjusts the volume slider.&lt;/td&gt;
&lt;td&gt;Instantly lists all available audio hardware input and output devices (speakers, headphones, mics).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Apple Logo &lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Opens basic "About This Mac" menu.&lt;/td&gt;
&lt;td&gt;Changes the first option to &lt;strong&gt;System Information&lt;/strong&gt;, taking you straight to deep hardware and spec data.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. Micro-Adjustments for Audio and Brightness
&lt;/h2&gt;

&lt;p&gt;If standard volume and brightness steps feel too drastic, the Option key gives you granular control:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quick Settings Access:&lt;/strong&gt; Pressing &lt;code&gt;Option + Volume Key&lt;/code&gt; instantly opens your Sound System Settings directly, skipping manual navigation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Micro-Stepping:&lt;/strong&gt; Hold &lt;code&gt;Shift + Option&lt;/code&gt; while pressing the &lt;strong&gt;Volume&lt;/strong&gt; or &lt;strong&gt;Brightness keys&lt;/strong&gt;. This adjusts the levels in tiny, precise fractions rather than full blocks, allowing you to perfectly dial in your environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. High-Speed Text Editing
&lt;/h2&gt;

&lt;p&gt;For anyone editing long documents, articles, or code, navigating text using a mouse is a massive bottleneck. Memorize these shortcuts to move at warp speed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Move by Word:&lt;/strong&gt; Press &lt;code&gt;Option + Left/Right Arrow&lt;/code&gt; to skip the cursor forward or backward one entire word at a time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Move by Paragraph:&lt;/strong&gt; Press &lt;code&gt;Option + Up/Down Arrow&lt;/code&gt; to jump the cursor up or down by a full line/paragraph.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed Selection:&lt;/strong&gt; Combine these with &lt;code&gt;Shift&lt;/code&gt; (&lt;code&gt;Shift + Option + Arrows&lt;/code&gt;) to instantly highlight entire words or full sentences at a time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. The Ultimate Panic Button: Force Quit
&lt;/h2&gt;

&lt;p&gt;When an application completely freezes, your mouse stops responding, and the spinning beachball of death appears, do not panic and do not hard-restart your computer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Shortcut:&lt;/strong&gt; Press &lt;code&gt;Command + Option + Escape&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; This immediately fires up the &lt;strong&gt;Force Quit Applications&lt;/strong&gt; window. Simply use your keyboard's arrow keys to highlight the frozen app, hit &lt;code&gt;Enter&lt;/code&gt;, and it will instantly terminate the application without disrupting the rest of your system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion: Work Smarter, Not Harder
&lt;/h2&gt;

&lt;p&gt;The Mac ecosystem is packed with subtle engineering choices designed to make power users faster, and the Option key is the gateway to most of them. By integrating just two or three of these habits into your daily routine, you'll cut out hours of tedious clicking over time.&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Move Git Commits to a New Branch With Updated Timestamps</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 24 Jun 2026 07:56:35 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-move-git-commits-to-a-new-branch-with-updated-timestamps-271n</link>
      <guid>https://dev.to/shawon/how-to-move-git-commits-to-a-new-branch-with-updated-timestamps-271n</guid>
      <description>&lt;p&gt;Ever needed to move a batch of commits from one branch to another — and make them look like they happened right now? Maybe you're cleaning up your Git history before opening a PR, or reorganizing work across branches after the fact.&lt;/p&gt;

&lt;p&gt;Whatever the reason, Git makes this surprisingly doable. Here's how.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Scenario
&lt;/h2&gt;

&lt;p&gt;You're on a branch called &lt;code&gt;feature-branch&lt;/code&gt; and the last 6 commits need to move to a brand new branch called &lt;code&gt;clean-branch&lt;/code&gt;. You also want every commit's timestamp to reflect the current time instead of when you originally wrote the code.&lt;/p&gt;

&lt;p&gt;By the end of this tutorial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ A new branch will have your commits with fresh timestamps&lt;/li&gt;
&lt;li&gt;✅ The original branch will no longer contain those commits&lt;/li&gt;
&lt;li&gt;✅ All commit messages and file changes stay intact&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1: Note Your Commit Hashes
&lt;/h2&gt;

&lt;p&gt;First, grab the hashes of the commits you want to move. We'll list them oldest-first so they replay in the right order:&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;-6&lt;/span&gt; &lt;span class="nt"&gt;--reverse&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h %s"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a1b2c3d feat: add user settings page
d4e5f6a fix: sidebar alignment on mobile
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 2: Create the New Branch
&lt;/h2&gt;

&lt;p&gt;Create your new branch starting from the point &lt;em&gt;before&lt;/em&gt; those 6 commits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; clean-branch HEAD~6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This puts you on &lt;code&gt;clean-branch&lt;/code&gt;, which currently has everything your original branch had &lt;em&gt;except&lt;/em&gt; the last 6 commits.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What does &lt;code&gt;HEAD~6&lt;/code&gt; mean?&lt;/strong&gt;&lt;br&gt;
It means "the commit that is 6 steps before the current one." So the new branch starts right where those 6 commits began.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 3: Cherry-Pick With New Timestamps
&lt;/h2&gt;

&lt;p&gt;Now replay each commit onto the new branch, but override the timestamp. Replace the hashes below with your actual ones from Step 1:&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="nv"&gt;NOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"2026-06-24T02:50:33+06:00"&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="nb"&gt;hash &lt;/span&gt;&lt;span class="k"&gt;in &lt;/span&gt;a1b2c3d d4e5f6a g7h8i9j k0l1m2n o3p4q5r s6t7u8v&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;GIT_AUTHOR_DATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$NOW&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;GIT_COMMITTER_DATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$NOW&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; git cherry-pick &lt;span class="nt"&gt;--no-edit&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$hash&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the &lt;code&gt;NOW&lt;/code&gt; value with your desired timestamp, or use the current time dynamically:&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="nv"&gt;NOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="nt"&gt;-Iseconds&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wait — Git has &lt;em&gt;two&lt;/em&gt; dates?
&lt;/h3&gt;

&lt;p&gt;Yes! Every commit stores two timestamps:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Author date&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;When the change was originally written&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Committer date&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;When the commit was last applied (rebased, cherry-picked, amended)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Tools like GitHub show the author date by default. The &lt;code&gt;GIT_AUTHOR_DATE&lt;/code&gt; and &lt;code&gt;GIT_COMMITTER_DATE&lt;/code&gt; environment variables let you override both.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Verify the Timestamps
&lt;/h2&gt;

&lt;p&gt;Confirm that both dates were updated:&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;-6&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h | %s | Author: %ad | Committer: %cd"&lt;/span&gt; &lt;span class="nt"&gt;--date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;iso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every commit should now show your chosen timestamp for both fields.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Remove the Commits From the Original Branch
&lt;/h2&gt;

&lt;p&gt;The commits still exist on your original branch. To "move" them (not just copy), reset that branch back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch &lt;span class="nt"&gt;-f&lt;/span&gt; feature-branch feature-branch~6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rewrites the &lt;code&gt;feature-branch&lt;/code&gt; pointer to exclude the last 6 commits. Since you've already got them on &lt;code&gt;clean-branch&lt;/code&gt;, nothing is lost.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Quick Version
&lt;/h2&gt;

&lt;p&gt;If you want the whole thing as a copy-paste script:&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;# Config — edit these&lt;/span&gt;
&lt;span class="nv"&gt;SOURCE_BRANCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"feature-branch"&lt;/span&gt;
&lt;span class="nv"&gt;NEW_BRANCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"clean-branch"&lt;/span&gt;
&lt;span class="nv"&gt;NUM_COMMITS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;6
&lt;span class="nv"&gt;NOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="nt"&gt;-Iseconds&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# 1. Get commit hashes (oldest first)&lt;/span&gt;
&lt;span class="nv"&gt;HASHES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git log -&lt;span class="nv"&gt;$NUM_COMMITS&lt;/span&gt; &lt;span class="nt"&gt;--reverse&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# 2. Create new branch from before those commits&lt;/span&gt;
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nv"&gt;$NEW_BRANCH&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SOURCE_BRANCH&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;~&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NUM_COMMITS&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# 3. Cherry-pick with updated timestamps&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="nb"&gt;hash &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$HASHES&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;GIT_AUTHOR_DATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$NOW&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;GIT_COMMITTER_DATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$NOW&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; git cherry-pick &lt;span class="nt"&gt;--no-edit&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$hash&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;

&lt;span class="c"&gt;# 4. Remove commits from original branch&lt;/span&gt;
git branch &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$SOURCE_BRANCH&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SOURCE_BRANCH&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;~&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NUM_COMMITS&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# 5. Verify&lt;/span&gt;
git log -&lt;span class="nv"&gt;$NUM_COMMITS&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h | %ad | %s"&lt;/span&gt; &lt;span class="nt"&gt;--date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;iso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Good to Know
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;This rewrites history.&lt;/strong&gt; The new commits will have different hashes. If the original branch was already pushed, you'll need to force-push (&lt;code&gt;git push --force&lt;/code&gt;) — coordinate with your team first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cherry-pick preserves authorship.&lt;/strong&gt; The commit author name and email stay the same; only the dates change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conflicts are possible.&lt;/strong&gt; If the commits depend on each other in tricky ways, cherry-pick will pause and ask you to resolve conflicts, just like a rebase would.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want different timestamps per commit?&lt;/strong&gt; Instead of a single &lt;code&gt;$NOW&lt;/code&gt;, you can set a unique date inside the loop for each cherry-pick.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;That's it — six commits, new branch, clean timestamps. Happy rebasing! 🎉&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Dev Hack: How to Stop TypeScript (.ts) Files From Ruining Your macOS Smart Folders</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 24 Jun 2026 07:36:33 +0000</pubDate>
      <link>https://dev.to/shawon/dev-hack-how-to-stop-typescript-ts-files-from-ruining-your-macos-smart-folders-3f4h</link>
      <guid>https://dev.to/shawon/dev-hack-how-to-stop-typescript-ts-files-from-ruining-your-macos-smart-folders-3f4h</guid>
      <description>&lt;p&gt;If you are a web developer who also happens to keep a movie collection or video assets on your Mac, you’ve probably run into a deeply frustrating macOS quirk.&lt;/p&gt;

&lt;p&gt;You decide to set up a Finder &lt;strong&gt;Smart Folder&lt;/strong&gt; to track your recent video files or movies. You set the criteria to &lt;code&gt;Kind is Movie&lt;/code&gt;, look at the results, and instead of a clean list of MP4s and MKVs, your folder is absolutely flooded with thousands of &lt;code&gt;.ts&lt;/code&gt; files from your local development projects.&lt;/p&gt;

&lt;p&gt;Here’s why this happens and how to permanently banish TypeScript files from your media filters without breaking Finder’s search scope.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: macOS Thinks You’re an MPEG-2 Enthusiast
&lt;/h2&gt;

&lt;p&gt;By default, macOS recognizes the &lt;code&gt;.ts&lt;/code&gt; file extension as an &lt;strong&gt;MPEG-2 Transport Stream&lt;/strong&gt;—a video container format used for broadcast streaming and DVDs.&lt;/p&gt;

&lt;p&gt;Finder has absolutely no idea that you are a modern JavaScript developer building applications. It just sees thousands of &lt;code&gt;.ts&lt;/code&gt; source files in your &lt;code&gt;node_modules&lt;/code&gt; or project directories and proudly flags them as "Movies."&lt;/p&gt;

&lt;p&gt;If you try to fix this by typing &lt;code&gt;-extension:ts&lt;/code&gt; directly into the Finder search bar, it often resets the search scope, causing your Smart Folder to completely break and return zero results.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix: Using Advanced "Raw Query" Rows
&lt;/h2&gt;

&lt;p&gt;To filter out TypeScript code without breaking your global search scope, you need to use Finder's hidden advanced boolean logic. Here is how to set it up step-by-step:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Set Up Your Base Media Filters
&lt;/h3&gt;

&lt;p&gt;Open Finder, press &lt;code&gt;Cmd + Option + N&lt;/code&gt; to create a new Smart Folder, and set up your initial include parameters using the standard &lt;code&gt;+&lt;/code&gt; button. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kind&lt;/strong&gt; is &lt;code&gt;Movie&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Last opened date&lt;/strong&gt; is within the last &lt;code&gt;365&lt;/code&gt; days&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Reveal the Hidden Boolean Menu
&lt;/h3&gt;

&lt;p&gt;Do not touch the search bar. Instead, hold down the &lt;strong&gt;Option (⌥)&lt;/strong&gt; key on your keyboard. You will notice that the &lt;code&gt;+&lt;/code&gt; buttons on the right side of your rules instantly transform into &lt;strong&gt;&lt;code&gt;...&lt;/code&gt; (Ellipsis)&lt;/strong&gt; icons.&lt;/p&gt;

&lt;p&gt;Click the &lt;strong&gt;&lt;code&gt;...&lt;/code&gt;&lt;/strong&gt; button on your bottom row. This spawns a nested sub-rule block.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Target the &lt;code&gt;.ts&lt;/code&gt; Extension Exclusively
&lt;/h3&gt;

&lt;p&gt;Configure your new nested rule block to strictly target and exclude the file extension:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Change the main dropdown of this nested block from &lt;em&gt;Any&lt;/em&gt; or &lt;em&gt;All&lt;/em&gt; to &lt;strong&gt;None&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the first dropdown in the sub-row underneath it and select &lt;strong&gt;Other...&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;"File extension"&lt;/strong&gt;, check the box next to it to enable it, and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the row to: &lt;strong&gt;File extension&lt;/strong&gt; | &lt;strong&gt;is&lt;/strong&gt; | &lt;strong&gt;&lt;code&gt;ts&lt;/code&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your smart folder rules should now look exactly like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Note: Replace with your screenshot if publishing!)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Kind] is [Movie]
[Last opened date] is within last [365] [days]
└── [None] of the following are true:
    └── [File extension] is [ts]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h3&gt;
  
  
  4. Save and Forget
&lt;/h3&gt;

&lt;p&gt;Click the &lt;strong&gt;Save&lt;/strong&gt; button in the upper right corner, name your folder (e.g., &lt;em&gt;"Recent Movies"&lt;/em&gt;), and keep &lt;strong&gt;"Add to Sidebar"&lt;/strong&gt; checked.&lt;/p&gt;

&lt;p&gt;Finder will now perfectly index your entire drive for actual video files while completely ignoring your development workspace. No more digging through a sea of TypeScript components just to find a video file.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tutorial</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Blocked by Mac Security? How to Fix “Apple Could Not Verify” Errors in Seconds</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 27 May 2026 06:53:48 +0000</pubDate>
      <link>https://dev.to/shawon/blocked-by-mac-security-how-to-fix-apple-could-not-verify-errors-in-seconds-4hmj</link>
      <guid>https://dev.to/shawon/blocked-by-mac-security-how-to-fix-apple-could-not-verify-errors-in-seconds-4hmj</guid>
      <description>&lt;p&gt;Getting the "Apple could not verify this app is free of malware" error on macOS? Learn 3 quick ways to bypass Gatekeeper and open blocked Mac apps safely.&lt;/p&gt;




&lt;p&gt;We’ve all been there. You download a perfectly safe, trusted app from a developer’s website, try to open it, and macOS immediately throws a security tantrum.&lt;/p&gt;

&lt;p&gt;The dreaded popup reads: &lt;strong&gt;"[App Name] Not Opened. Apple could not verify this app is free of malware..."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is macOS Gatekeeper doing its job a little &lt;em&gt;too&lt;/em&gt; well. If you’re 100% sure the app is safe, you don't need to throw it in the trash. Here is how to override the block and launch your app in seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Method 1: Override via System Settings
&lt;/h2&gt;

&lt;p&gt;If the shortcut doesn't work, you can manually grant permission through your Mac's security settings.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click the &lt;strong&gt;Apple logo&lt;/strong&gt; in the top left and open &lt;strong&gt;System Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Privacy &amp;amp; Security&lt;/strong&gt; in the left sidebar.&lt;/li&gt;
&lt;li&gt;Scroll down to the &lt;strong&gt;Security&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;You will see a notification stating your app was blocked. Click the &lt;strong&gt;Open Anyway&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Enter your Mac login password or use Touch ID to confirm.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Method 2: The Terminal Nuclear Option (For Stubborn Apps)
&lt;/h2&gt;

&lt;p&gt;If the app still refuses to open, macOS may have aggressively quarantined the file. You can strip the quarantine flag using a simple Terminal command.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;Terminal&lt;/strong&gt; app (Press &lt;code&gt;Cmd + Space&lt;/code&gt; and search for Terminal).&lt;/li&gt;
&lt;li&gt;Copy and paste the following command, adding a &lt;strong&gt;space&lt;/strong&gt; at the very end:
&lt;/li&gt;
&lt;/ol&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;xattr &lt;span class="nt"&gt;-rd&lt;/span&gt; com.apple.quarantine 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Drag and drop the blocked app icon from your &lt;strong&gt;Applications&lt;/strong&gt; folder directly into the Terminal window (this automatically inputs the exact file path).&lt;/li&gt;
&lt;li&gt;Hit &lt;strong&gt;Enter&lt;/strong&gt;, type your Mac's admin password (no characters will show, just type and hit Enter), and try opening the app again.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Method 3: The Right-Click Shortcut (Fastest Fix)
&lt;/h2&gt;

&lt;p&gt;The absolute quickest way to bypass the macOS unidentified developer block is the secret right-click trick.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Finder&lt;/strong&gt; and go to your &lt;strong&gt;Applications&lt;/strong&gt; folder.&lt;/li&gt;
&lt;li&gt;Locate the blocked app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Right-click&lt;/strong&gt; (or hold &lt;code&gt;Control&lt;/code&gt; and click) the app icon, then select &lt;strong&gt;Open&lt;/strong&gt; from the menu.&lt;/li&gt;
&lt;li&gt;A new dialogue box will appear, but this time, it will include an &lt;strong&gt;Open&lt;/strong&gt; button. Click it, and macOS will permanently whitelist the app.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;A Quick Safety Reminder:&lt;/strong&gt; macOS Gatekeeper exists to protect your system. Only use these bypass methods if you downloaded the app from an official, trusted source. If you aren't sure where the app came from, it’s safer to delete it.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Fix the Notch: How to Stop macOS Hiding Your Menu Bar Icons</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sun, 24 May 2026 11:56:54 +0000</pubDate>
      <link>https://dev.to/shawon/fix-the-notch-how-to-stop-macos-hiding-your-menu-bar-icons-69n</link>
      <guid>https://dev.to/shawon/fix-the-notch-how-to-stop-macos-hiding-your-menu-bar-icons-69n</guid>
      <description>&lt;p&gt;The notch on modern MacBooks gives us beautiful, near-borderless displays. But for heavy multitaskers, it introduces a frustrating design flaw: &lt;strong&gt;macOS hides menu bar icons behind the notch when you run out of space.&lt;/strong&gt; Because Apple provides no native overflow menu, essential utility apps simply disappear into a digital black hole. You shouldn't have to force-quit applications just to access your status icons.&lt;/p&gt;

&lt;p&gt;Here is how to quickly reclaim your MacBook menu bar real estate.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Condense Everything with "Only Switch" (Free &amp;amp; Open Source)
&lt;/h2&gt;

&lt;p&gt;If your menu bar is cluttered with individual icons for Dark Mode, Keep Awake, Bluetooth, and Night Shift, you are wasting prime real estate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Only Switch&lt;/strong&gt; is a powerful, open-source utility that consolidates dozens of settings into a single menu bar icon. Clicking it reveals a clean dropdown panel of customizable toggles. By replacing five or six separate app icons with just one, you instantly clear massive space so other apps never get pushed behind the notch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bonus Feature:&lt;/strong&gt; Only Switch includes a "Hide Notch" toggle that turns the menu bar background pure black, blending the notch seamlessly into the display bezel.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Hide Clutter with a Menu Bar Manager
&lt;/h2&gt;

&lt;p&gt;If you have a large collection of apps that &lt;em&gt;need&lt;/em&gt; to stay running, use a dedicated manager to collapse them into a hidden drawer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ice (Free &amp;amp; Open Source):&lt;/strong&gt; A modern, lightweight app designed specifically for macOS that lets you hide or show icons with a simple toggle arrow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden Bar (Free):&lt;/strong&gt; An ultra-minimalist "collapsible drawer" tool. Hold &lt;code&gt;Command (⌘)&lt;/code&gt; and drag low-priority icons behind the separator bar to tuck them out of sight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bartender (Paid):&lt;/strong&gt; The gold standard. It creates a secondary "bar" completely underneath the main menu bar when you hover your mouse, ensuring zero icons are ever lost.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Tighten Icon Spacing via Terminal (No Apps Required)
&lt;/h2&gt;

&lt;p&gt;Apple quietly increased the horizontal padding between menu bar icons in recent macOS versions, wasting valuable screen width. You can force macOS to tighten this spacing using two quick Terminal commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Terminal&lt;/strong&gt; (&lt;code&gt;Cmd + Space&lt;/code&gt; and type Terminal).&lt;/li&gt;
&lt;li&gt;Paste this command and press &lt;strong&gt;Enter&lt;/strong&gt; to shrink the icon containers:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;defaults write com.apple.controlcenter &lt;span class="s2"&gt;"NSStatusItem2ExtensionMinPadding"&lt;/span&gt; &lt;span class="nt"&gt;-int&lt;/span&gt; 6

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Paste this command and press &lt;strong&gt;Enter&lt;/strong&gt; to reduce the gap between icons:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;defaults write com.apple.controlcenter &lt;span class="s2"&gt;"NSStatusItemSpacing"&lt;/span&gt; &lt;span class="nt"&gt;-int&lt;/span&gt; 6

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Apply the changes by restarting the control center:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;killall ControlCenter

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;To revert to Apple's default airy spacing, run the same commands but change &lt;code&gt;-int 6&lt;/code&gt; to &lt;code&gt;-int 12&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The 5-Second Emergency Fix
&lt;/h2&gt;

&lt;p&gt;If an icon you desperately need &lt;em&gt;right now&lt;/em&gt; is hidden behind the notch, don't panic. Go to &lt;strong&gt;System Settings &amp;gt; Displays&lt;/strong&gt; and temporarily select &lt;strong&gt;"More Space"&lt;/strong&gt; as your resolution. This shrinks the UI, expanding the menu bar text and forcing the hidden icons to pop out so you can click them.&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary: What is the best solution?
&lt;/h3&gt;

&lt;p&gt;For the cleanest setup, install &lt;strong&gt;Only Switch&lt;/strong&gt; to consolidate your toggles, or use &lt;strong&gt;Ice&lt;/strong&gt; to hide secondary icons. Combined with the Terminal spacing tweak, your MacBook notch will never block your workflow again.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>productivity</category>
      <category>tooling</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git Push Rejected? Here's Exactly How to Fix a Non-Fast-Forward Error (Fast)</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 13 May 2026 06:59:14 +0000</pubDate>
      <link>https://dev.to/shawon/git-push-rejected-heres-exactly-how-to-fix-a-non-fast-forward-error-fast-4oob</link>
      <guid>https://dev.to/shawon/git-push-rejected-heres-exactly-how-to-fix-a-non-fast-forward-error-fast-4oob</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;You type &lt;code&gt;git push&lt;/code&gt;, hit Enter, and Git slaps you with a rejection. No warning. No obvious reason. Just an error that makes you stare at the screen wondering what you broke.&lt;br&gt;&lt;br&gt;
You didn't break anything — but you &lt;em&gt;do&lt;/em&gt; need to fix it. Here's how.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What's Actually Going On
&lt;/h2&gt;

&lt;p&gt;When Git says your push was &lt;strong&gt;rejected due to a non-fast-forward error&lt;/strong&gt;, it's telling you one specific thing: your local branch and the remote branch have &lt;strong&gt;diverged&lt;/strong&gt; — they've each gone in different directions since their last shared point.&lt;/p&gt;

&lt;p&gt;In plain terms: someone (or something — maybe an automated CI commit) added a commit to the remote branch &lt;em&gt;after&lt;/em&gt; you last pulled. Now your local branch has a commit the remote doesn't, and the remote has a commit &lt;em&gt;you&lt;/em&gt; don't.&lt;/p&gt;

&lt;p&gt;Git's response? &lt;strong&gt;Refuse the push.&lt;/strong&gt; Pushing would silently overwrite the remote's new commit, and Git will never let that happen without a fight.&lt;/p&gt;




&lt;h2&gt;
  
  
  Spot the Divergence in Seconds
&lt;/h2&gt;

&lt;p&gt;Run this to see exactly where you stand:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If you're in this situation, you'll see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your branch and 'origin/your-branch-name' have diverged,
and have 1 and 1 different commits each, respectively.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Ahead 1, behind 1&lt;/strong&gt; — that's the smoking gun. Local and remote have each moved forward independently. Before you can push, you need to reconcile them.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix: Rebase, Don't Merge
&lt;/h2&gt;

&lt;p&gt;The cleanest way to resolve this is a &lt;strong&gt;rebase pull&lt;/strong&gt; followed by a push:&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 &lt;span class="nt"&gt;--rebase&lt;/span&gt; origin your-branch-name
git push origin your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Two commands and you're done — assuming no conflicts.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does this actually do?
&lt;/h3&gt;

&lt;p&gt;Rebasing takes your local commit and &lt;strong&gt;replays it on top of the latest remote commit&lt;/strong&gt;, as if you'd written it after the remote update. The result is a perfectly linear history with no ugly merge bubble cluttering up your git log.&lt;/p&gt;

&lt;p&gt;Before rebase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remote:  A --- B --- C  (origin/branch)
Local:   A --- B --- D  (your work)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After rebase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Result:  A --- B --- C --- D  (clean, linear, ready to push)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What If There Are Conflicts?
&lt;/h2&gt;

&lt;p&gt;If your changes overlap with what's on the remote, Git will pause the rebase and ask you to resolve them. Here's how to handle it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the conflicted file(s) — Git will mark the conflicts clearly.&lt;/li&gt;
&lt;li&gt;Edit the file to keep the right changes.&lt;/li&gt;
&lt;li&gt;Stage the resolved file:
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Continue the rebase:
&lt;/li&gt;
&lt;/ol&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;--continue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Push once the rebase completes:
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;p&gt;If things go sideways and you want to start over, you can always abort:&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;--abort&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why Rebase Instead of a Regular Pull?
&lt;/h2&gt;

&lt;p&gt;A standard &lt;code&gt;git pull&lt;/code&gt; (without &lt;code&gt;--rebase&lt;/code&gt;) creates a &lt;strong&gt;merge commit&lt;/strong&gt; to join the two diverged histories. That works, but it adds noise — especially for small, clean feature branches. Your log ends up littered with &lt;code&gt;Merge branch 'origin/xyz' into xyz&lt;/code&gt; commits that don't add any meaningful context.&lt;/p&gt;

&lt;p&gt;Rebase gives you a cleaner story:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;git pull&lt;/code&gt; (merge)&lt;/th&gt;
&lt;th&gt;&lt;code&gt;git pull --rebase&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;History shape&lt;/td&gt;
&lt;td&gt;Branching + merge commit&lt;/td&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Extra commits&lt;/td&gt;
&lt;td&gt;Yes (merge commit)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Long-lived or shared branches&lt;/td&gt;
&lt;td&gt;Feature branches, solo work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conflict handling&lt;/td&gt;
&lt;td&gt;One step&lt;/td&gt;
&lt;td&gt;Step-by-step per commit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For most short-lived feature branches, &lt;strong&gt;rebase is the better choice&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Prevent This From Happening Again
&lt;/h2&gt;

&lt;p&gt;Non-fast-forward errors are almost always avoidable with a few consistent habits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pull before you push&lt;/strong&gt; — especially on branches others might touch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Push often&lt;/strong&gt; — smaller, more frequent pushes reduce the window for divergence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set rebase as your default pull strategy&lt;/strong&gt; so you never accidentally create merge commits:
&lt;/li&gt;
&lt;/ul&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; pull.rebase &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check your status before pushing&lt;/strong&gt; — a quick &lt;code&gt;git status&lt;/code&gt; costs two seconds and saves you from surprises.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Big Takeaway
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;git push&lt;/code&gt; rejection almost never means something is wrong with your code. It means Git is &lt;strong&gt;protecting history&lt;/strong&gt;, and all you need to do is sync up before you push.&lt;/p&gt;

&lt;p&gt;The next time you see &lt;em&gt;non-fast-forward&lt;/em&gt;, remember the two-step formula:&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 &lt;span class="nt"&gt;--rebase&lt;/span&gt; origin your-branch-name
git push origin your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sync first. Push second. Ship faster.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>Fix "Cannot find module" TypeScript Errors Without Touching a Single Line of Code</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Tue, 28 Apr 2026 21:04:36 +0000</pubDate>
      <link>https://dev.to/shawon/fix-cannot-find-module-typescript-errors-without-touching-a-single-line-of-code-2i96</link>
      <guid>https://dev.to/shawon/fix-cannot-find-module-typescript-errors-without-touching-a-single-line-of-code-2i96</guid>
      <description>&lt;p&gt;You've just created a new file. TypeScript swears it doesn't exist. Here's why — and the one-second fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;You add a new file to your project. You import from it. A red squiggly appears instantly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cannot find module './filename' or its corresponding type declarations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the file is right there. You can see it in the file tree. You've already run &lt;code&gt;tsc --noEmit&lt;/code&gt; and zero errors came back. So what's going on?&lt;/p&gt;

&lt;h2&gt;
  
  
  The culprit: a stale language server
&lt;/h2&gt;

&lt;p&gt;VS Code (and most TypeScript-aware editors) run a background TypeScript language server process that powers autocomplete, type-checking, and error highlighting. This server caches a snapshot of your project's file graph. When you create a brand-new file, the server sometimes doesn't notice — so it flags imports from that file as missing, even though the compiler itself is perfectly happy.&lt;/p&gt;

&lt;p&gt;This is a known rough edge of the TS language server, not a problem with your code or your configuration.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Quick test:&lt;/strong&gt; if &lt;code&gt;tsc&lt;/code&gt; on the command line shows no errors but your editor shows red squiggles on a new import, this is almost certainly the cause.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The fix: restart the TS server in VS Code
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open the command palette with &lt;code&gt;Cmd + Shift + P&lt;/code&gt; (macOS) or &lt;code&gt;Ctrl + Shift + P&lt;/code&gt; (Windows/Linux).&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;TypeScript: Restart TS Server&lt;/code&gt; and press Enter.&lt;/li&gt;
&lt;li&gt;Wait a few seconds. The language server re-indexes your project, discovers the new file, and the error disappears.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No configuration changes. No file edits. No restarting the entire editor. Just a server restart and you're back to work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why does this happen?
&lt;/h2&gt;

&lt;p&gt;TypeScript's compiler (&lt;code&gt;tsc&lt;/code&gt;) reads from the filesystem at the moment you run it, so it always sees the correct state. The language server is different — it's a long-running process that watches for file changes via filesystem events. Those events are not perfectly reliable, particularly on macOS (which uses FSEvents) when files are created programmatically or by tooling rather than directly in the editor. The server misses the creation event and its cached file graph goes stale.&lt;/p&gt;

&lt;p&gt;Restarting the server forces a full re-scan, which resolves the inconsistency immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other editors
&lt;/h2&gt;

&lt;p&gt;The same issue can occur in JetBrains IDEs (WebStorm, IntelliJ) and Neovim with LSP plugins. The fix is the same concept: restart or invalidate the TypeScript language server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JetBrains:&lt;/strong&gt; &lt;code&gt;File → Invalidate Caches → Restart&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neovim:&lt;/strong&gt; &lt;code&gt;:LspRestart&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If the error persists after restarting the server, double-check that the file path and export names in your import statement exactly match those in the new file — casing matters on Linux systems.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>The "Windows Update Ate My Grub" Fix: A One-Line Lifesaver</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Tue, 07 Apr 2026 22:09:53 +0000</pubDate>
      <link>https://dev.to/shawon/the-windows-update-ate-my-grub-fix-a-one-line-lifesaver-4334</link>
      <guid>https://dev.to/shawon/the-windows-update-ate-my-grub-fix-a-one-line-lifesaver-4334</guid>
      <description>&lt;p&gt;It’s a tale as old as time (or at least as old as UEFI). You spend your morning updating Windows, hit restart, and instead of your familiar GRUB menu offering a choice between Linux and Windows, you’re booted straight into Windows. &lt;/p&gt;

&lt;p&gt;Your Linux partition isn't gone, and your files are safe—Windows has simply "reclaimed" the boot priority, effectively hiding the door to your Ubuntu installation.&lt;/p&gt;

&lt;p&gt;While many guides suggest booting from a Live USB and re-installing GRUB (which takes ages), there is a &lt;strong&gt;surgical, one-line fix&lt;/strong&gt; you can run right from inside Windows.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Magic Command
&lt;/h3&gt;

&lt;p&gt;If you are using Ubuntu (or most Ubuntu-based distros like Mint or Pop!_OS), open the &lt;strong&gt;Command Prompt as Administrator&lt;/strong&gt; and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bcdedit /set {bootmgr} path \efi\ubuntu\grubx64.efi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What does this actually do?
&lt;/h3&gt;

&lt;p&gt;Windows uses a tool called &lt;code&gt;bcdedit&lt;/code&gt; (Boot Configuration Data editor) to manage how the computer starts. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;{bootmgr}&lt;/code&gt;&lt;/strong&gt;: This targets the Windows Boot Manager.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;path \efi\ubuntu\grubx64.efi&lt;/code&gt;&lt;/strong&gt;: This tells the Windows Boot Manager that instead of looking for the Windows startup file, it should point directly to the GRUB bootloader file located on your EFI partition.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Boot into Windows:&lt;/strong&gt; Since GRUB is missing, you’re likely already here.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Open CMD as Admin:&lt;/strong&gt; Press the &lt;code&gt;Win&lt;/code&gt; key, type &lt;code&gt;cmd&lt;/code&gt;, right-click it, and select &lt;strong&gt;Run as Administrator&lt;/strong&gt;. This is crucial; the command will fail without elevated permissions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Run the Command:&lt;/strong&gt; Copy and paste the command above and hit Enter. You should see a message saying "The operation completed successfully."&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Restart:&lt;/strong&gt; Reboot your machine. Your GRUB menu should reappear, giving you back access to your Linux world.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  "It didn't work!" (Troubleshooting)
&lt;/h3&gt;

&lt;p&gt;If the command runs but nothing changes, or if you get an error, check these two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Secure Boot:&lt;/strong&gt; Sometimes Secure Boot prevents the handoff to GRUB. Try disabling it in your BIOS/UEFI settings if the problem persists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path Variation:&lt;/strong&gt; If you aren't using Ubuntu, the folder name might be different. For example, Fedora users would likely use &lt;code&gt;\efi\fedora\grubx64.efi&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why does this happen?
&lt;/h3&gt;

&lt;p&gt;Windows updates occasionally overwrite the "Boot Order" stored in your motherboard’s NVRAM to ensure Windows remains the default OS. By running this command, you aren't "breaking" Windows; you're just politely telling the motherboard that GRUB is the rightful conductor of the orchestra.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro-tip:&lt;/strong&gt; Keep this command in a Note or a physical sticky note. Windows updates are inevitable, and having this shortcut saves you from a 30-minute troubleshooting session down the road!&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>How to Check the Number of Lines Changed in Your Current Git Branch Compared to Main</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Mon, 24 Nov 2025 10:48:29 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-check-the-number-of-lines-changed-in-your-current-git-branch-compared-to-main-3m6m</link>
      <guid>https://dev.to/shawon/how-to-check-the-number-of-lines-changed-in-your-current-git-branch-compared-to-main-3m6m</guid>
      <description>&lt;p&gt;When working with Git, developers often need to understand how much their current branch differs from the main branch. This can help in assessing the scope of changes, planning reviews, or making decisions before merging. One useful metric is the total number of lines added and removed between branches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Check Lines of Diff?
&lt;/h3&gt;

&lt;p&gt;Counting the lines of code changed gives a quick snapshot of the volume of work done. It helps to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gauge the size of your feature or fix.&lt;/li&gt;
&lt;li&gt;Estimate code review effort.&lt;/li&gt;
&lt;li&gt;Track progress against expectations.&lt;/li&gt;
&lt;li&gt;Identify large or complex changes that might require extra testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using Git to Check Line Differences
&lt;/h3&gt;

&lt;p&gt;The Git command line provides simple ways to check these differences precisely.&lt;/p&gt;

&lt;p&gt;The most straightforward command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff --shortstat main...HEAD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s how it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git diff&lt;/code&gt; shows changes between commits or branches.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;main...HEAD&lt;/code&gt; compares your current branch (&lt;code&gt;HEAD&lt;/code&gt;) with the main branch.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--shortstat&lt;/code&gt; gives a brief summary report with the total files changed, and lines added and deleted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, running this command might show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 files changed, 45 insertions(+), 20 deletions(-)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means across 3 files, you've added 45 lines and removed 20 lines compared to main.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting More Detailed Line Counts
&lt;/h3&gt;

&lt;p&gt;If you want to see the exact line changes per file, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff main...HEAD --numstat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command outputs a list where each line contains the number of added and deleted lines per file. It’s handy for deeper inspection or for scripting purposes.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Disable Automatic Rearrangement of Desktops (Spaces) on Mac</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Fri, 21 Nov 2025 09:58:59 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-disable-automatic-rearrangement-of-desktops-spaces-on-mac-50kn</link>
      <guid>https://dev.to/shawon/how-to-disable-automatic-rearrangement-of-desktops-spaces-on-mac-50kn</guid>
      <description>&lt;p&gt;macOS offers a powerful feature called Spaces, which allows users to organize their open applications across multiple virtual desktops or workspaces. This helps maintain an organized workflow by separating projects or tasks into distinct environments. However, a feature that automatically rearranges these desktops based on your recent app usage can sometimes disrupt this organization. If you prefer your desktops to remain in a fixed order, it is essential to disable this auto-rearrangement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Desktop (Spaces) Auto Rearrangement?
&lt;/h3&gt;

&lt;p&gt;By default, macOS reorders your desktops (also called Spaces) so that the most recently used desktop appears next to your current one. While this can be useful for some people to quickly switch between frequently used spaces, it often causes confusion and breaks your muscle memory of where apps or documents reside.&lt;/p&gt;

&lt;p&gt;For instance, if you have Chrome on Desktop 2 and a document on Desktop 3, after switching between them, macOS might shuffle these desktops, making it hard to keep track of your workspace layout.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Disable Auto Rearrangement?
&lt;/h3&gt;

&lt;p&gt;Disabling this feature locks your desktops in the order you set, avoiding unexpected shuffling and helping maintain a consistent workflow. It is especially helpful for users who rely heavily on multiple desktops or workspaces for different tasks, making navigation predictable and stable.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Disable Auto Rearrangement of Desktops on macOS
&lt;/h3&gt;

&lt;p&gt;The process to disable automatic rearrangement is straightforward and involves adjusting the Mission Control settings from System Settings. Here’s how:&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Click the Apple menu () and open &lt;strong&gt;System Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the sidebar, select &lt;strong&gt;Desktop &amp;amp; Dock&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll down to the &lt;strong&gt;Mission Control&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;Find the option labeled &lt;strong&gt;"Automatically rearrange Spaces based on most recent use"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Toggle this option &lt;strong&gt;off&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once disabled, macOS will no longer move your desktops around based on usage, preserving the custom order you prefer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This setting is relevant for macOS Ventura and later. On older macOS versions, look for the similar option under &lt;strong&gt;System Preferences &amp;gt; Mission Control&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Disabling this feature does not affect your ability to create or delete desktops; it only stops the system from rearranging existing ones.&lt;/li&gt;
&lt;li&gt;If you use full-screen apps, they will still create new spaces as usual, just without automatic reshuffling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The automatic rearrangement of deskspaces can disrupt productivity and cause frustration for users accustomed to a set order of virtual desktops. Thankfully, macOS allows you to disable this feature easily, giving you control back over your workspace organization. By following the steps outlined above, you can keep your desktops locked in place and enjoy a more stable and predictable workflow.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tutorial</category>
      <category>ux</category>
    </item>
    <item>
      <title>How to Reset a Remote Git Repository to Match Your Local State: A Careful Approach</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 17 Sep 2025 09:04:02 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-reset-a-remote-git-repository-to-match-your-local-state-a-careful-approach-4ld0</link>
      <guid>https://dev.to/shawon/how-to-reset-a-remote-git-repository-to-match-your-local-state-a-careful-approach-4ld0</guid>
      <description>&lt;p&gt;Working with Git and GitHub is great until a mistake or unwanted commit is pushed to the remote repository. Sometimes, you need to undo those mistakes and force the remote repository to match your corrected local state. This must be done carefully to avoid disrupting collaborators and losing important work.&lt;/p&gt;

&lt;p&gt;This guide will walk you through the safest and most effective way to reset a remote repository to a specific commit in your local repository while highlighting important precautions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Backup Your Current State
&lt;/h2&gt;

&lt;p&gt;Before making any changes that rewrite history, always take a backup of your current local branch. This protects you from accidental data loss and allows you to recover changes if needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch backup-before-force-push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a new branch &lt;code&gt;backup-before-force-push&lt;/code&gt; that preserves your current state.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Fetch Latest Changes from Remote
&lt;/h2&gt;

&lt;p&gt;Make sure your local Git repository has the latest information from the remote repository:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This updates all remote tracking branches without modifying your local branch or working directory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Reset Your Local Branch to the Desired Commit
&lt;/h2&gt;

&lt;p&gt;Identify the commit hash you want to reset to (the last known good state). Then, reset your local branch hard to that 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;good-commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;&amp;lt;good-commit-hash&amp;gt;&lt;/code&gt; with the actual commit ID. This moves your branch pointer and makes your working directory match the specified commit exactly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Force Push to Overwrite Remote History
&lt;/h2&gt;

&lt;p&gt;Now that your local branch is at the correct commit, you need to force push to update the remote repository:&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;--force-with-lease&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command overwrites the remote branch &lt;code&gt;main&lt;/code&gt; with your local branch state.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--force-with-lease&lt;/code&gt; is safer than a simple force because it checks if the remote branch has changed since you last fetched, preventing you from accidentally overwriting someone else's work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace &lt;code&gt;main&lt;/code&gt; with your branch name if different.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Important Warnings and Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Communicate with your team:&lt;/strong&gt; If working with collaborators, notify them before rewriting history. They will need to sync their local repositories afterwards to avoid conflicts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backup important changes:&lt;/strong&gt; Double-check you have saved any work that shouldn't be lost, as &lt;code&gt;git reset --hard&lt;/code&gt; and force push discard changes from both local and remote.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Force push carefully:&lt;/strong&gt; Rewriting history can cause confusion if done without care, so use &lt;code&gt;--force-with-lease&lt;/code&gt; whenever possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prepare collaborators to reset their local branches:&lt;/strong&gt; Anyone who pulled the previous commits will need to reset or reclone to align with the rewritten history.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Resetting a remote Git repository to match a clean local state involves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Backing up your current local branch&lt;/li&gt;
&lt;li&gt;Fetching the latest changes from remote&lt;/li&gt;
&lt;li&gt;Hard resetting your local branch to a known good commit&lt;/li&gt;
&lt;li&gt;Force pushing your rebased branch to remote with &lt;code&gt;--force-with-lease&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following these steps carefully and communicating effectively, you can safely undo mistakes pushed to GitHub and maintain clean project history.&lt;/p&gt;




&lt;p&gt;This approach ensures your local and remote repositories are perfectly aligned while minimizing risks associated with overwriting shared history.&lt;/p&gt;

&lt;p&gt;If unsure, always make backups and coordinate with your team!&lt;/p&gt;




</description>
      <category>git</category>
      <category>github</category>
      <category>development</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
