<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Pawinphat Charoenrat</title>
    <description>The latest articles on Forem by Pawinphat Charoenrat (@pawic).</description>
    <link>https://forem.com/pawic</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%2F3325424%2F1c0a35c5-49f0-44f9-86ec-7f90ba68a63b.jpg</url>
      <title>Forem: Pawinphat Charoenrat</title>
      <link>https://forem.com/pawic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pawic"/>
    <language>en</language>
    <item>
      <title>Git Full Speed Ahead Part 4 : TIP 1 # Updating Git Bash on Windows</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Sat, 31 Jan 2026 07:31:13 +0000</pubDate>
      <link>https://forem.com/pawic/real-world-git-tips-1-updating-git-bash-on-windows-194d</link>
      <guid>https://forem.com/pawic/real-world-git-tips-1-updating-git-bash-on-windows-194d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Git Bash is a favorite tool for a lot of Windows developers. It lets us enjoy a Unix-like shell without having to leave Windows behind.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The catch is… many of us keep using Git Bash for ages and completely forget to update it. That’s usually when strange, hard-to-track bugs start popping up.&lt;/p&gt;

&lt;p&gt;In this article, we’ll walk through how to update Git Bash on Windows the right way—safe, simple, and without messing up your existing environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ Check your current Git Bash version first
&lt;/h3&gt;

&lt;p&gt;Before updating anything, it’s a good idea to check which version you’re currently using.&lt;/p&gt;

&lt;p&gt;Open Git Bash and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git --version
&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.amazonaws.com%2Fuploads%2Farticles%2Fhshmxku80mivngmuzkaq.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%2Fhshmxku80mivngmuzkaq.png" alt="Check version git bash" width="469" height="136"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note (Jan 2026): The latest Git version is 2.52.&lt;br&gt;
If you’re seeing a much older version (for example, something that’s months or even years behind), it’s a good idea to update right away. Git gets bug fixes and security patches on a regular basis, so staying up to date really matters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🎯 Updating Git Bash from Git Bash (if the updater is available)
&lt;/h3&gt;

&lt;p&gt;Newer versions of Git for Windows come with a built-in updater.&lt;/p&gt;

&lt;p&gt;In Git Bash, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git update-git-for-windows

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

&lt;/div&gt;



&lt;p&gt;After running the update command, one of two things will happen:&lt;/p&gt;

&lt;p&gt;1. A newer version is available&lt;br&gt;
Git Bash will show a message saying something like “Download and install Git” and ask for confirmation.&lt;br&gt;
Type Y, and the update process will start automatically.&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%2Fzdyq03g5f2sywhkd3zfi.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%2Fzdyq03g5f2sywhkd3zfi.png" alt="Git bash show update" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhzxv6fzv9kideqx1hwvq.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%2Fhzxv6fzv9kideqx1hwvq.png" alt="download new git bash" width="798" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. You’re already on the latest version&lt;br&gt;
Git will let you know that everything is up to date, and there’s nothing else you need to do.&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%2Fl85yaln6tsreb76c0835.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%2Fl85yaln6tsreb76c0835.png" alt="git bash is up to date " width="472" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎰 Keeping Git Bash up to date might feel like a small, boring task—but it can save you from a surprising amount of pain later. Many strange bugs, unexpected behaviors, or security issues come from running an outdated Git version without realizing it.&lt;/p&gt;

&lt;p&gt;The good news is that updating Git Bash on Windows is usually quick and safe, especially if you use the built-in updater. Make it a habit to check your Git version every once in a while. Your future self (and your teammates) will thank you.&lt;/p&gt;

&lt;p&gt;Sometimes, the best debugging tool is simply… staying up to date.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>programming</category>
      <category>bash</category>
    </item>
    <item>
      <title>From Zero to WordPress: Build Your Site Locally with LocalWP – Part 1</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Tue, 02 Sep 2025 08:25:04 +0000</pubDate>
      <link>https://forem.com/pawic/build-your-first-website-part-1-wordpress-setup-with-localwp-2noa</link>
      <guid>https://forem.com/pawic/build-your-first-website-part-1-wordpress-setup-with-localwp-2noa</guid>
      <description>&lt;p&gt;When people first start building a website, they often run into the same wall: Where do I even begin? Writing code from scratch feels intimidating, but relying on a website builder can feel limiting. Many end up stuck in between—the desire to create something online versus the technical hurdles that seem to block the way.&lt;/p&gt;

&lt;p&gt;This is where WordPress changes the game. It began as a simple blogging platform, but over time it has grown into one of the most powerful and flexible website-building tools in the world. Today, more than 40% of all websites on the internet are powered by WordPress.&lt;/p&gt;

&lt;p&gt;But what if you want to experiment with WordPress without spending money on real hosting or risking mistakes on a live site? That’s where LocalWP comes in. It lets you set up WordPress locally on your own computer—safe, fast, and surprisingly fun.&lt;/p&gt;

&lt;h2&gt;
  
  
  📌 Install LocalWP
&lt;/h2&gt;

&lt;p&gt;1. Download LocalWP from &lt;a href="https://localwp.com/" rel="noopener noreferrer"&gt;Localwp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1cs2gj7kfu00rnns8pjc.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%2F1cs2gj7kfu00rnns8pjc.png" alt="Download LocalWP" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Install it on your computer&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%2Fcy8znh7kypjjwgzn3445.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%2Fcy8znh7kypjjwgzn3445.png" alt="Install localwp on your computer" width="617" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. After Installing&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%2Fldxayanqji5kmnmxa2l3.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%2Fldxayanqji5kmnmxa2l3.png" alt="Install localwp success" width="612" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. LocalWP Dashboard&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%2Fxsgexi3rlsy0u8amh0eq.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%2Fxsgexi3rlsy0u8amh0eq.png" alt="LocalWP Dashboard" width="800" height="525"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 Basic Setup of LocalWP
&lt;/h2&gt;

&lt;p&gt;1. Go to your Profile&lt;br&gt;
2. Select Preferences&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%2Fi7mddofecvxp4q5mlwq9.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%2Fi7mddofecvxp4q5mlwq9.png" alt="Setup localwp 1" width="786" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Configure the settings as desired in Appearance and Behavior&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%2F1jcrhsx4ww8hc4nutbik.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%2F1jcrhsx4ww8hc4nutbik.png" alt="Configure the setting of localwp" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Select “Log in to Local”&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%2Fch0ndb6778ox53cjargh.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%2Fch0ndb6778ox53cjargh.png" alt="Log in to Local" width="794" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. After selecting “Log in to Local,” the application will open your browser. If this is your first time, choose “Create an Account.” If you already have an account, you can simply log in.&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%2Fkevb8jbw3tofj2elg32v.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%2Fkevb8jbw3tofj2elg32v.png" alt="Create an Account " width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6. Fill in all the required information and click “Create Your Account.”&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%2F9prj1qv4ds8tmd0iaqhi.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%2F9prj1qv4ds8tmd0iaqhi.png" alt="Create Your Account" width="500" height="863"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Creating a New Site
&lt;/h2&gt;

&lt;p&gt;1. Click “Create a New Site” or press the plus (+) button&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%2Fuo69f79hx6k4lk1o39t2.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%2Fuo69f79hx6k4lk1o39t2.png" alt="Create a new site" width="796" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Insert your site's name and click Continue&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%2Fbgjxamffa1rv9bl3ei0l.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%2Fbgjxamffa1rv9bl3ei0l.png" alt="Enter a site name" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Select your preferred environment and click Continue&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%2F2k6xmw8tpaz4lo0acwyt.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%2F2k6xmw8tpaz4lo0acwyt.png" alt="Select your preferred environment" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Set up WordPress and click “Add Site.” It’s recommended to open the Advanced Options and choose your preferred language as well.&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%2F1sy656hicsp6twk7mwvb.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%2F1sy656hicsp6twk7mwvb.png" alt="Add site" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. LocalWP is downloading WordPress…&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%2Fqq9p1fodx5ml3wpdeut8.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%2Fqq9p1fodx5ml3wpdeut8.png" alt="The system is installing" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6. Once the site has been created, this window will appear&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%2F7ywcf6s80peu6kj0zjee.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%2F7ywcf6s80peu6kj0zjee.png" alt="Once the site has been created" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔦 Deleting a Site
&lt;/h2&gt;

&lt;p&gt;Right-click on the site name, scroll down, and click Delete.&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%2F0dh3nlamv4b1yaf3dchn.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%2F0dh3nlamv4b1yaf3dchn.png" alt="Delete of site name" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A confirmation dialog will appear&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%2Fl3ebhv5dpm1p6bcuogjw.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%2Fl3ebhv5dpm1p6bcuogjw.png" alt="Dialog for delete " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎐 Launch LocalWP &amp;amp; Start Building with WordPress
&lt;/h2&gt;

&lt;p&gt;1. Open the app named Local&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%2F8j9dhhkavzx5s66ey1wt.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%2F8j9dhhkavzx5s66ey1wt.png" alt="app localwp" width="89" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. The LocalWP app has the following overview:&lt;/p&gt;

&lt;p&gt;2.1 Number 1: The site name you want to develop with WordPress&lt;br&gt;
2.2 Number 2: Access the WordPress Admin panel via your browser&lt;br&gt;
2.3 Number 3: Open the site in your browser&lt;br&gt;
2.4 Number 4: Start the site&lt;br&gt;
2.5 Number 5: Site host&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%2Fggo4bapcm5q18wxduof9.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%2Fggo4bapcm5q18wxduof9.png" alt="LocalWP app" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Once the site is started, you can notice that it’s running as shown in the image.&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%2Fqppwzf4ejjweiz9acdht.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%2Fqppwzf4ejjweiz9acdht.png" alt="site is started" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Try opening WordPress by clicking on Number 3 or by typing the URL from Number 5 into your browser’s address bar.&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%2F1y647r5jiaazy9bm3cum.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%2F1y647r5jiaazy9bm3cum.png" alt="Open wordpress " width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;And that’s a wrap on getting started with LocalWP! You now have a safe, local playground to experiment with WordPress without worrying about breaking anything online.&lt;/p&gt;

&lt;p&gt;In Part 2, we’ll dive into WordPress itself—exploring themes, plugins, and tips to help you build your very first fully functional website. Stay tuned, because this is where the fun really begins!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>web</category>
      <category>programming</category>
    </item>
    <item>
      <title>Git Full Speed Ahead Part 3: Git Remote Repositories: Push, Pull, and Collaborate Easily</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Mon, 18 Aug 2025 12:12:24 +0000</pubDate>
      <link>https://forem.com/pawic/git-full-speed-ahead-part-3-from-local-to-remote-connecting-your-workflow-to-the-world-1ec</link>
      <guid>https://forem.com/pawic/git-full-speed-ahead-part-3-from-local-to-remote-connecting-your-workflow-to-the-world-1ec</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is a Git Branch?&lt;/li&gt;
&lt;li&gt;Basic Git Branch Commands&lt;/li&gt;
&lt;li&gt;Creating a New Branch&lt;/li&gt;
&lt;li&gt;Switching Branches&lt;/li&gt;
&lt;li&gt;Merging a Branch into the Main Branch&lt;/li&gt;
&lt;li&gt;Deleting a Branch&lt;/li&gt;
&lt;li&gt;Understanding git push in Depth&lt;/li&gt;
&lt;li&gt;Creating a PAT (Personal Access Token)&lt;/li&gt;
&lt;li&gt;Working with Remote Repositories in Git&lt;/li&gt;
&lt;li&gt;Step 1: Configuring a remote&lt;/li&gt;
&lt;li&gt;Step 2: Pulling and cloning repositories&lt;/li&gt;
&lt;li&gt;Step 3: Pushing changes to remote&lt;/li&gt;
&lt;li&gt;Removing or updating a remote config&lt;/li&gt;
&lt;li&gt;Renaming a Branch&lt;/li&gt;
&lt;li&gt;GIT FETCH&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🪴 What is a Git Branch?
&lt;/h2&gt;

&lt;p&gt;In version control systems like Git, a branch is a separate line of development. It allows you to work on new features or bug fixes independently, without affecting the main codebase (usually main or master).&lt;/p&gt;

&lt;p&gt;Think of Git as a map of your project, where each branch is a different route you can take. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;main (or master) → The stable code, ready for production&lt;/li&gt;
&lt;li&gt;feature/login → Developing a login system&lt;/li&gt;
&lt;li&gt;bugfix/header → Fixing a header display issue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Branches let you experiment safely, collaborate with teammates, and keep the codebase organized. They’re a core concept in Git that make development smoother and more predictable.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Benefits of Git Branches
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Parallel Development: Multiple developers can work on different features at the same time.&lt;/li&gt;
&lt;li&gt;Risk Isolation: Changes are made on separate branches, so the main branch remains safe from accidental issues. &lt;/li&gt;
&lt;li&gt;Easy Cleanup: If a branch introduces problems, it can simply be deleted without affecting the main codebase.&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.amazonaws.com%2Fuploads%2Farticles%2F3aq4jekftj5qwqdbej13.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.amazonaws.com%2Fuploads%2Farticles%2F3aq4jekftj5qwqdbej13.jpg" alt="git branch example" width="800" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Git Branches in One Picture 🧠&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we start a new project with &lt;code&gt;git init&lt;/code&gt; and follow it with &lt;code&gt;git add&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt;, we get an initial branch called &lt;code&gt;main&lt;/code&gt; (or master, depending on the Git version).&lt;/p&gt;

&lt;p&gt;In this diagram, each circle represents a commit we’ve made, and the lines show the path of the main branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📌 Two key points in the diagram:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before the commit named &lt;em&gt;main 1.1&lt;/em&gt;, a branch called &lt;em&gt;bugfix&lt;/em&gt; was created to fix a bug. It was later merged back into main at main 4.1.&lt;/p&gt;

&lt;p&gt;After &lt;em&gt;main 1.1&lt;/em&gt;, another branch called &lt;em&gt;feature&lt;/em&gt; was created to work on new developments. This branch &lt;strong&gt;hasn’t&lt;/strong&gt; been merged back yet (it’s still separate).&lt;/p&gt;

&lt;p&gt;This is one of Git’s superpowers: it allows us to work on multiple things simultaneously without mixing them together. You can develop new features, fix bugs, or even experiment on a temporary branch, all safely 🤓.&lt;/p&gt;

&lt;p&gt;“Think of it like taking a side road: you go fix something, and then come back to the main road — Git makes this simple and safe.”&lt;/p&gt;

&lt;h2&gt;
  
  
  🧬 Git Branch Inheritance: Step by Step
&lt;/h2&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%2Fgxjtkqlsiqplfzkr0l65.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.amazonaws.com%2Fuploads%2Farticles%2Fgxjtkqlsiqplfzkr0l65.jpg" alt="Guide to branch data" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Happens:&lt;/strong&gt;&lt;br&gt;
Branch &lt;code&gt;main&lt;/code&gt;&lt;br&gt;
This is the starting point. All commits, the staging area, and the working directory contain only the data from main.&lt;/p&gt;

&lt;p&gt;Branch &lt;code&gt;feature-1&lt;/code&gt;&lt;br&gt;
When we create this branch from main, it gets a “snapshot” of the latest state of main at that moment.&lt;br&gt;
This means commits, the staging area, and the working directory include everything from main plus any changes made in feature-1.&lt;/p&gt;

&lt;p&gt;Branch &lt;code&gt;feature-2&lt;/code&gt;&lt;br&gt;
This branch is created from feature-1, so it inherits everything from main + feature-1, and adds only the changes specific to feature-2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Are the Different Parts of Git Separated?&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Git Component&lt;/th&gt;
&lt;th&gt;Meaning in This Context&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;commit&lt;/td&gt;
&lt;td&gt;A recorded snapshot saved in Git’s database (git commit).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;staging area&lt;/td&gt;
&lt;td&gt;Changes prepared for the next commit (git add places them here).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;working directory&lt;/td&gt;
&lt;td&gt;The actual files you see in your project folder right now (may not be committed or staged yet).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ref (HEAD/heads)&lt;/td&gt;
&lt;td&gt;A pointer to the latest position of each branch.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;So, when feature-2 is created from feature-1, it’s like Git saying:&lt;br&gt;
“Okay, I’ll start a new branch and copy over the latest state of feature-1 — including commits, the staging area, and the working directory — so you can continue working from there.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;🔁 Common Misconception:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“For example, if the main branch gets a new commit, it will automatically affect all branches created from it.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ The Truth:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A new commit on one branch does not affect any other branch.&lt;/p&gt;

&lt;p&gt;(This applies to main, feature, or any branch.)&lt;/p&gt;

&lt;p&gt;Changes only propagate if you explicitly merge or rebase onto another branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧪 Visual Comparison:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Creating a branch is like copying a friend’s notebook and writing in your own copy.&lt;br&gt;
If your friend writes 10 more pages, your notebook doesn’t change — unless you decide to copy those pages again.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  💻 Basic Git Branch Commands
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Listing Branches&lt;/strong&gt;&lt;br&gt;
This command shows all the Git branches you have created.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;git branch lists all branches and marks the current branch with an asterisk (*).&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%2F5sdi73rhzxdkseuig01e.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%2F5sdi73rhzxdkseuig01e.png" alt="git branch command" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ✏️ Creating a New Branch
&lt;/h2&gt;

&lt;p&gt;This command is used to create a new branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch &amp;lt;branch-name&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Use this command to create a new branch with the specified name.&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%2Fxkk2slrj18e7e2dbkv10.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%2Fxkk2slrj18e7e2dbkv10.png" alt="create branch" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ Branch Naming Rules (Must Avoid or Strongly Discouraged)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1. Do not use names that conflict with Git references&lt;br&gt;
&lt;em&gt;Examples: HEAD, FETCH_HEAD, ORIG_HEAD, MERGE_HEAD, index&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;2. Do not use spaces&lt;br&gt;
&lt;em&gt;Example: feature new login → ✅ feature-new-login or feature/new-login&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;3. Do not start or end with /&lt;br&gt;
&lt;em&gt;Example : /feature/login, feature/ → ✅ feature/login&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;4. Do not use .. (two consecutive dots)&lt;br&gt;
&lt;em&gt;Example: feature..bugfix&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;5. Do not use @{}&lt;br&gt;
&lt;em&gt;Example: fix@{bug}&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;6. Avoid certain special characters&lt;br&gt;
&lt;em&gt;Example: ~, ^, :, ?, [, \&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;7. Do not name a branch the same as a tag&lt;/p&gt;
&lt;h2&gt;
  
  
  ♻️ Switching Branches
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git switch &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use this when you want to switch and start working on a different branch.&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%2Fn73sr6nyay2ehethrh67.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%2Fn73sr6nyay2ehethrh67.png" alt="Switch branch by git" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TIP&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can combine creating a new branch and switching to it in a single command:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git switch -c &amp;lt;branch-name&amp;gt;
&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.amazonaws.com%2Fuploads%2Farticles%2F05axq6t1w8e3instbvvo.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%2F05axq6t1w8e3instbvvo.png" alt="git switch and create branch " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Merging a Branch into the Main Branch
&lt;/h2&gt;

&lt;p&gt;Git merge is a fundamental command in Git that allows you to combine the development histories of two or more branches into a single branch. It is a key part of collaborative workflows, as it enables developers to integrate new features and bug fixes from a feature branch into the main branch of a project without losing any work.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge &amp;lt;branch-name&amp;gt;
&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.amazonaws.com%2Fuploads%2Farticles%2F19b6rafw2g9ew6yekylz.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%2F19b6rafw2g9ew6yekylz.png" alt="merge branch" width="702" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the example above, I added an option file in the ABC branch. When merging the ABC branch into main, Git shows the changes, and using git log reveals that the commit history from the ABC branch has also been included.&lt;/p&gt;

&lt;h2&gt;
  
  
  📛 Deleting a Branch
&lt;/h2&gt;

&lt;p&gt;You can remove a branch that is no longer needed using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -d &amp;lt;branch-name&amp;gt;
&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.amazonaws.com%2Fuploads%2Farticles%2Fcpbzfgxnr33mlpuw24vh.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%2Fcpbzfgxnr33mlpuw24vh.png" alt="delete branch" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚠️ Caution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;git branch -d and git branch -D are not the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ git branch -d  – Safe delete&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deletes the branch only if it has been fully merged into your current branch (e.g., main).&lt;/li&gt;
&lt;li&gt;Prevents you from losing any unmerged work.&lt;/li&gt;
&lt;li&gt;Git will show an error if the branch hasn’t been merged yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ &lt;strong&gt;git branch -D  – Force delete&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forces deletion even if the branch hasn’t been merged.&lt;/li&gt;
&lt;li&gt;Can accidentally delete work that hasn’t been merged yet.&lt;/li&gt;
&lt;li&gt;No safety checks are performed—you might lose unmerged changes.&lt;/li&gt;
&lt;li&gt;Equivalent to git branch --delete --force.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Understanding git push in Depth
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Have you ever wondered... after finishing work on your local machine, how do you make your code appear on GitHub? The answer is git push!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, we’ll dive into what the git push command is, how it works, and the key things you should know to use Git with more confidence 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  🔼 What is git push?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; is the command used to push your code from your local machine to a remote repository (such as GitHub, GitLab, or Bitbucket).&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Benefits of git push
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. ✅ Backing Up Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeps your code safe even if your computer is damaged.&lt;/li&gt;
&lt;li&gt;A copy of your code lives on GitHub or another remote.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. 👥 Team Collaboration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team members can pull (git pull) the latest code from the remote to continue working.&lt;/li&gt;
&lt;li&gt;Prevents duplicate or conflicting code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. 📜 Change History&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every push records the current state of your project.&lt;/li&gt;
&lt;li&gt;Makes it easy to roll back or restore a previous version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. 🌍 Sharing Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Share your code with others for viewing or review.&lt;/li&gt;
&lt;li&gt;Handy for submitting work via a GitHub link.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. 🚀 Automatic Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some systems (like Vercel, Netlify, or CI/CD pipelines) automatically deploy your project whenever you push.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔁 Quick Recap: Local vs Remote&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;git commit → Saves your changes locally on your machine&lt;br&gt;
 git push → Sends those changes to the server&lt;/p&gt;
&lt;/blockquote&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%2Fyjp9o67ocu5zeoa1ik0r.gif" 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%2Fyjp9o67ocu5zeoa1ik0r.gif" alt="git push" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explaining the Diagram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1. Starting Point: Synchronized&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Local Repository (on your computer) and the Remote Repository (on the server) contain the same code, because you’ve already pushed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2. While Working: Unsynchronized&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You create Commit 2 locally, then continue working and create Commit 3.&lt;/li&gt;
&lt;li&gt;At this point, the Local repository is two commits ahead of the Remote, but nothing has been pushed yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3. Ending Point: Synchronized Again&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you’re ready, you can push once to send both Commit 2 and Commit 3 to the Remote.&lt;/li&gt;
&lt;li&gt;Now the Local and Remote repositories are back in sync.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single push can send all pending commits at once—there’s no need to push after every commit.&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 Creating a PAT (Personal Access Token)
&lt;/h2&gt;

&lt;p&gt;1. You need to have a repository on GitHub. If you don’t have one yet, see &lt;a href="https://dev.to/pawic/git-full-speed-ahead-part-1-installing-git-on-windows-and-getting-started-in-no-time-22ge#lets-create-a-github-account-and-repository-"&gt;Part 1&lt;/a&gt;.&lt;br&gt;
2. You’ll need to prepare a PAT by following these steps:&lt;br&gt;
3. Go to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, click on your profile in the top-right corner, and select Settings.&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%2Fz11ecxhkn831wckwqb06.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%2Fz11ecxhkn831wckwqb06.png" alt=" " width="467" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Go to the Developer settings section on the left-hand side.&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%2Fepxtkduidze9mojf3qcy.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%2Fepxtkduidze9mojf3qcy.png" alt="Developer setting menu" width="237" height="799"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. Click on Personal access tokens, where you’ll see two options: fine-grained tokens and classic.&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%2Fgzxo5ay05bfbsvcg3m1x.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%2Fgzxo5ay05bfbsvcg3m1x.png" alt="Personal access tokens" width="329" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📭 Note&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Classic PATs → Provide very broad access across personal and organizational repositories. If the key is leaked, the risk is high.&lt;/li&gt;
&lt;li&gt;Fine-grained Tokens → Allow more precise control, such as limiting access to specific repositories or granting permissions by category (e.g., read/write issues, code). This reduces potential damage if the key is leaked and is better suited for high-security needs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my example, I chose Fine-grained tokens and clicked Generate new token.&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%2F28sxmdl4pyhha367ua0h.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%2F28sxmdl4pyhha367ua0h.png" alt="chose Fine-grained tokens" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7. Enter the details&lt;br&gt;
    * Token name – Give your token a recognizable name&lt;br&gt;
    * Description – Add optional details about the token’s purpose&lt;br&gt;
    * Owner – Select the account that will own the token&lt;br&gt;
    * Expiration date – Set when the token should expire&lt;br&gt;
    * Repository access – Choose which repositories the token can access&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Public repositories → The token can only access public repos. Ideal if you just need to fetch open-source code or run automation without touching your private repos.&lt;/li&gt;
&lt;li&gt;All repositories → The token can access all repos you have permission for, both public and private. This gives full access but carries higher risk if the token is exposed.&lt;/li&gt;
&lt;li&gt;Only select repositories → The token can only access specific repos you choose when creating it. Best for limiting scope to a single project or targeted automation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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%2Fc1o2shxhmwzu9b6onxqx.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%2Fc1o2shxhmwzu9b6onxqx.png" alt="Enter the details" width="800" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8. Set the necessary permissions – For example, set Contents to Read and Write.&lt;/p&gt;

&lt;p&gt;8.1 Make sure the permissions match the task you need.&lt;br&gt;
8.2 Incorrect settings may cause the token not to work or reduce security.&lt;br&gt;
8.3 Once configured, click Generate Token.&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%2F2x7nwyovvnohfhl971wc.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%2F2x7nwyovvnohfhl971wc.png" alt="Set the necessary permissions " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9. Copy the PAT and store it somewhere safe.&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%2Fdb6mu9dv1cqzyj6d44vi.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%2Fdb6mu9dv1cqzyj6d44vi.png" alt="PAT" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📡 Working with Remote Repositories in Git
&lt;/h2&gt;

&lt;p&gt;When working with Git, you usually start with a &lt;em&gt;local repository&lt;/em&gt; on your machine. But to collaborate with others or back up your code, you’ll need to connect it to a &lt;strong&gt;remote repository&lt;/strong&gt; (such as GitHub, GitLab, or Bitbucket).  &lt;/p&gt;
&lt;h3&gt;
  
  
  🛠️ Step 1: Configuring a remote
&lt;/h3&gt;

&lt;p&gt;1. After making your commits and preparing to push to a repository for the first time, use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -M main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. Next, check whether the repository URL has been configured using this command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If the command returns the repository name, you can skip steps 3–4. If it returns nothing or prompts for a new input, follow steps 3–4.&lt;/p&gt;
&lt;/blockquote&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%2Fmi6x94l2e3n374gq63ph.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%2Fmi6x94l2e3n374gq63ph.png" alt="check url repository" width="688" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Go to the GitHub website, navigate to &lt;em&gt;Profile &amp;gt; Your repositories&lt;/em&gt;, and select the repository you want.&lt;/p&gt;

&lt;p&gt;4. Copy the repository's URL.&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%2Fm8l9v1xt4gkdntgmprpd.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%2Fm8l9v1xt4gkdntgmprpd.png" alt=" repository URL" width="800" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.1 If you’re working in a team or joining an existing project where the repository already has commits, the process to copy the URL is slightly different: go to Code and copy the repository URL from there.&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%2Fblu9te011z87za99lze4.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%2Fblu9te011z87za99lze4.png" alt="repository URL team " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have the repository URL, use the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Example &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%2Fbswxhuweytrrodprtl21.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%2Fbswxhuweytrrodprtl21.png" alt="remote add origin url repository" width="689" height="216"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Step 2: Pulling and cloning repositories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;🌀 Git Clone
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;git clone&lt;/code&gt; command is used to copy a project from a remote repository to your local machine.&lt;br&gt;
It brings over everything — branches, commits, files, and folders — so you can start working with the project locally.&lt;/p&gt;

&lt;p&gt;This command is typically used in the following cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you’re joining a development team that already has a remote repository.&lt;/li&gt;
&lt;li&gt;When you want to fork a repository and work on your own copy.&lt;/li&gt;
&lt;li&gt;When you need to clone a template repository to start a new project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 In short, &lt;code&gt;git clone&lt;/code&gt; is usually the first command you run when getting a project from a remote server.&lt;br&gt;
After cloning, you’ll use other commands like &lt;code&gt;git pull&lt;/code&gt; to keep your local copy up to date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git clone command&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    git clone &amp;lt;repository-url&amp;gt;
&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.amazonaws.com%2Fuploads%2Farticles%2Fg8qy9nq07w6tvbbg0mqg.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%2Fg8qy9nq07w6tvbbg0mqg.png" alt="git clone" width="589" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📜 Note&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you use git clone, there’s no need to run git init — the repository is already initialized for you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;📟 Git PULL
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; is the command used to update your local Git repository with the latest changes from the remote repository.&lt;br&gt;
It essentially combines two commands in one: &lt;code&gt;git fetch&lt;/code&gt; + &lt;code&gt;git merge.&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure you are on the branch you want to pull.
For example, if you want to pull updates from the main branch, switch to main first.&lt;/li&gt;
&lt;li&gt;Run the git pull command.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull
&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.amazonaws.com%2Fuploads%2Farticles%2F5urzdyyrs5no8hiuptue.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%2F5urzdyyrs5no8hiuptue.png" alt="git pull" width="606" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This table shows what happens when you run git pull, depending on whether your local branch is behind or up-to-date with the remote. It’s a quick reference for expected results and potential conflicts.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Local vs Remote State&lt;/th&gt;
&lt;th&gt;Merge Direction in &lt;code&gt;git pull&lt;/code&gt;
&lt;/th&gt;
&lt;th&gt;What Happens&lt;/th&gt;
&lt;th&gt;Common Outcome&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local is &lt;strong&gt;older&lt;/strong&gt; than remote&lt;/td&gt;
&lt;td&gt;Remote → Local&lt;/td&gt;
&lt;td&gt;Remote commits are merged (or fast-forwarded) into your local branch.&lt;/td&gt;
&lt;td&gt;Local branch moves forward to match remote.&lt;/td&gt;
&lt;td&gt;No conflicts unless overlapping changes exist.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local is &lt;strong&gt;equal&lt;/strong&gt; to remote&lt;/td&gt;
&lt;td&gt;No merge&lt;/td&gt;
&lt;td&gt;Nothing to merge — histories are identical.&lt;/td&gt;
&lt;td&gt;“Already up to date.”&lt;/td&gt;
&lt;td&gt;Working tree stays the same.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local is &lt;strong&gt;newer&lt;/strong&gt; than remote&lt;/td&gt;
&lt;td&gt;Remote → Local&lt;/td&gt;
&lt;td&gt;Git fetches remote, but since it’s behind, merge usually does nothing.&lt;/td&gt;
&lt;td&gt;Local branch unchanged; remote stays behind until &lt;code&gt;git push&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;Merge step may be skipped entirely if there are no remote changes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local and remote have &lt;strong&gt;diverged&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Remote → Local&lt;/td&gt;
&lt;td&gt;Remote commits and local commits are merged together.&lt;/td&gt;
&lt;td&gt;Merge commit created (or rebase if using &lt;code&gt;-rebase&lt;/code&gt;).&lt;/td&gt;
&lt;td&gt;Can cause merge conflicts; both histories are preserved.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  🚀 Step 3: Pushing changes to remote
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;br&gt; 🌈 GIT PUSH
&lt;/h3&gt;

&lt;p&gt;The push command sends your local changes to the remote repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -u origin &amp;lt;branch&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This command means: send all changes from the local main branch to the remote repository named &lt;code&gt;origin&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;1. When using git push, Git will prompt you to enter a password or token via a sign-in window (in this example, a token was used).&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%2Fp855a7i7oslyhe0ru2o9.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%2Fp855a7i7oslyhe0ru2o9.png" alt="github signin and PAT" width="405" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.1 Select Token.&lt;br&gt;
1.2 Enter your PAT in the input field (refer to the “Creating a PAT” section).&lt;/p&gt;

&lt;p&gt;2. Once the token is entered correctly, the local data will be successfully pushed to the remote repository.&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%2Fn8hc8k8vk7c6x86f0e3h.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%2Fn8hc8k8vk7c6x86f0e3h.png" alt="Once the token" width="662" height="210"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  ✳️ Pushing All Branches
&lt;/h3&gt;

&lt;p&gt;Previously, we pushed branches one at a time. If you have multiple branches, that means repeating the push process for each branch separately.&lt;/p&gt;

&lt;p&gt;Instead, if you want to push all branches at once in a single command, 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 push --all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔦 Commands for managing your remote and local branches:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;🗑️ Removing or updating a remote config
&lt;/h3&gt;

&lt;p&gt;If you want to remove or update the configuration of a remote connection, you can do so with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote rm origin
&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.amazonaws.com%2Fuploads%2Farticles%2Fnho6zzhccrn1wog0xk40.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%2Fnho6zzhccrn1wog0xk40.png" alt="remove branch config" width="691" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The command git remote rm origin is used to remove the connection between your local Git repository and the remote repository named origin.&lt;br&gt;
This removal does not delete the repository on GitHub; it only disconnects the link from your local machine. All files and history on GitHub remain intact.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;✒️ Renaming a Branch
&lt;/h3&gt;

&lt;p&gt;If you mistyped a branch name or want to change it, use this command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -m &amp;lt;old-branch-name&amp;gt; &amp;lt;new-branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example&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%2Fh0w10xcbkait3xm7rknb.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%2Fh0w10xcbkait3xm7rknb.png" alt="Rename branch" width="642" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;🎯 GIT FETCH
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Understanding git fetch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you run git fetch, Git checks the remote repository (like GitHub) for new commits, branches, and tags. It downloads these new items and stores them in your local repository as remote-tracking branches (e.g., origin/main). Your local working files and branches remain untouched.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git fetch
&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.amazonaws.com%2Fuploads%2Farticles%2F060otyjp0av30wx3kyz3.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%2F060otyjp0av30wx3kyz3.png" alt="git fetch" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From this example, let's say someone else has updated the main branch on the remote repository.&lt;/p&gt;

&lt;p&gt;Initially, if you run git status, it might report that your local branch is "up to date" because it's only checking its internal data, which doesn't know about the new remote changes yet.&lt;/p&gt;

&lt;p&gt;When you run git fetch, Git downloads those new changes. Although git fetch itself often doesn't produce a clear output, your local repository now has the new data.&lt;/p&gt;

&lt;p&gt;To see the result of the &lt;code&gt;git fetch&lt;/code&gt;, you can then run &lt;code&gt;git status&lt;/code&gt; &lt;strong&gt;again&lt;/strong&gt;. It will now report that your local main branch is behind the origin/main branch. This is the explicit "report" you were looking for.&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%2Ftx7v18oia2cihohdy3sk.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%2Ftx7v18oia2cihohdy3sk.png" alt="git status after git fetch" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you were to make changes and &lt;strong&gt;push&lt;/strong&gt; to main &lt;strong&gt;without updating&lt;/strong&gt; first, your changes would be &lt;strong&gt;rejected&lt;/strong&gt; by the remote repository. This is a safety feature to prevent you from accidentally overwriting the updates from your teammates. To fix this, you would need to use &lt;code&gt;git pull&lt;/code&gt; to first merge the remote changes into your local branch before pushing again.&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%2F69feqjayfvo4vlfz2uts.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%2F69feqjayfvo4vlfz2uts.png" alt="git push prevent you from accidentally" width="800" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✒️ Note&lt;/strong&gt;&lt;br&gt;
If you’ve already run &lt;code&gt;git fetch&lt;/code&gt; before, running it again may not show any new downloads — but that doesn’t &lt;strong&gt;necessarily&lt;/strong&gt; mean your local repository is fully up to date with the remote. It’s recommended to run &lt;code&gt;git status&lt;/code&gt; to verify the current state.&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%2Fktk2dg568hfbkqgy3c4d.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%2Fktk2dg568hfbkqgy3c4d.png" alt="git fetch again" width="800" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 Best Practice with git fetch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;git fetch&lt;/code&gt; before &lt;code&gt;git status&lt;/code&gt; to check if you’re behind the remote.&lt;/li&gt;
&lt;li&gt;Always run &lt;code&gt;git fetch&lt;/code&gt; before &lt;code&gt;git push&lt;/code&gt; to avoid conflicts.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember: Running git fetch twice in a row might not show new output — it simply means nothing has changed remotely since the last fetch.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;git fetch&lt;/td&gt;
&lt;td&gt;Downloads new data from remote but doesn’t change local files&lt;/td&gt;
&lt;td&gt;Safe check for updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;git pull&lt;/td&gt;
&lt;td&gt;Downloads and merges remote changes into local branch&lt;/td&gt;
&lt;td&gt;When you’re ready to update your branch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;🏁 Wrapping Up&lt;/p&gt;

&lt;p&gt;We’ve covered the core Git commands for working with remotes — from cloning and pulling to pushing and managing configs.&lt;/p&gt;

&lt;p&gt;Keep practicing these commands, and soon collaborating with Git will feel second nature. 🚀&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>bash</category>
      <category>programming</category>
    </item>
    <item>
      <title>Screen Sharing 101: How to Use Miracast to Mirror Android to PC Without Third-Party Software</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Mon, 04 Aug 2025 07:20:36 +0000</pubDate>
      <link>https://forem.com/pawic/screen-sharing-101-how-to-use-miracast-to-mirror-android-to-pc-without-third-party-software-2nfg</link>
      <guid>https://forem.com/pawic/screen-sharing-101-how-to-use-miracast-to-mirror-android-to-pc-without-third-party-software-2nfg</guid>
      <description>&lt;p&gt;I had a need to mirror my Android screen to my computer, and I found a really convenient way to do it — using Wireless Display, a built-in feature included for free in Windows.&lt;/p&gt;

&lt;p&gt;This method allows you to share your mobile screen with your PC without using any third-party apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What Is Miracast?
&lt;/h2&gt;

&lt;p&gt;Miracast is a wireless technology that allows you to transmit both video and audio from one device to another via Wi-Fi Direct — no HDMI cables or additional apps required. Often referred to as “wireless HDMI”, Miracast supports high-resolution streaming, including 1080p and even 4K, depending on your hardware capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How It Works
&lt;/h2&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%2Fc4p557q8810z23mdn6i0.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.amazonaws.com%2Fuploads%2Farticles%2Fc4p557q8810z23mdn6i0.jpg" alt="miracast flow" width="800" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Topology Details
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. 🟠 Wi-Fi Direct (P2P / Ad-hoc)&lt;/strong&gt;&lt;br&gt;
The phone creates or connects via Wi-Fi Direct directly to the target device (TV, Laptop)&lt;/p&gt;

&lt;p&gt;No router or access point (AP) is required&lt;/p&gt;

&lt;p&gt;Temporarily disconnects the phone from its current Wi-Fi&lt;/p&gt;

&lt;p&gt;This is the classic Miracast mode (defined by the Wi-Fi Alliance standard)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Pros: Works even without an internet connection&lt;br&gt;
❌ Cons: You can't use the internet on your phone while casting&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;2. 🟢 Infrastructure-based Miracast&lt;/strong&gt;&lt;br&gt;
Both the phone and the target device connect to the same Wi-Fi network via an access point (AP)&lt;/p&gt;

&lt;p&gt;Uses TCP/UDP or Multicast within the local network&lt;/p&gt;

&lt;p&gt;Only works with devices that support "casting over network" (e.g., Windows 10/11, some Android devices)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Pros: Internet remains accessible; can be more stable in some cases&lt;br&gt;
❌ Cons: Requires a Wi-Fi router (AP); not all devices support this mode&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Topology&lt;/th&gt;
&lt;th&gt;Requires Wi-Fi Router?&lt;/th&gt;
&lt;th&gt;Internet Usable While Casting?&lt;/th&gt;
&lt;th&gt;Stability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Wi-Fi Direct&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;✅ Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Higher (if Wi-Fi is strong)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  🔧 Devices in a Miracast Setup
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Sender (Source / Transmitter)&lt;/strong&gt;&lt;br&gt;
The device that sends video and audio signals wirelessly to a receiving device via Miracast.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android smartphones &lt;/li&gt;
&lt;li&gt;Android tablets&lt;/li&gt;
&lt;li&gt;Windows 10/11 laptops or PCs (can cast to other displays)&lt;/li&gt;
&lt;li&gt;Media devices like Microsoft Surface&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Encode video/audio signals in real time&lt;/li&gt;
&lt;li&gt;Transmit the signal via Wi-Fi Direct to the Receiver&lt;/li&gt;
&lt;li&gt;Can operate in point-to-point or infrastructure (router-based) mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Receiver (Sink / Display)&lt;/strong&gt;&lt;br&gt;
The device that receives and renders the stream coming from the Sender.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Smart TVs with built-in Miracast support&lt;/li&gt;
&lt;li&gt;Windows 10/11 PCs/laptops (with "Projecting to this PC" enabled)&lt;/li&gt;
&lt;li&gt;Miracast dongles, such as the Microsoft Wireless Display Adapter&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Some Android TV boxes that support acting as a Miracast Receiver&lt;br&gt;
&lt;strong&gt;Responsibilities:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Receive the stream from the Sender&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Decode video and audio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Render output on the screen&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Optional Network Devices (Not Required, but Helpful)&lt;/strong&gt;&lt;br&gt;
While Miracast is designed to work peer-to-peer over Wi-Fi Direct — without a router — in practice, many devices are often connected to the same Wi-Fi network for convenience and reliability.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Wi-Fi Router: Makes device discovery easier&lt;/li&gt;
&lt;li&gt;Access Point / Mobile Hotspot: Acts as a central hub for network communication&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Note: These devices are not part of the Miracast standard itself, but they can improve stability, compatibility, and ease of device discovery during casting.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  🧰 Preparing Your PC Before You Start
&lt;/h2&gt;

&lt;p&gt;Before using Miracast, you’ll want to check whether your computer supports receiving a wireless display.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow these steps:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1. Press &lt;code&gt;Windows key + R&lt;/code&gt; to open the Run dialog box&lt;/p&gt;

&lt;p&gt;2. Type &lt;strong&gt;dxdiag&lt;/strong&gt; and hit Enter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dxdiag 
&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.amazonaws.com%2Fuploads%2Farticles%2Fo89r7xdqp15zimmx9zsh.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%2Fo89r7xdqp15zimmx9zsh.png" alt="type dxdiag " width="436" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. In the DirectX Diagnostic Tool window, click "Save All Information..."&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%2Fe6ph75b5e6o2yc699v34.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%2Fe6ph75b5e6o2yc699v34.png" alt="Save DirectX tools" width="753" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Open the saved .txt file and search for "Miracast"&lt;br&gt;
5. Look for a line like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Miracast: Available, with HDCP
&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.amazonaws.com%2Fuploads%2Farticles%2Fm055ubow3dt7s9eitd8a.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%2Fm055ubow3dt7s9eitd8a.png" alt="search Miracast in directx" width="537" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Your Miracast Status&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After checking the dxdiag report, you may see one of the following Miracast status lines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5.1 Miracast: Available, with HDCP&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This means your hardware &lt;strong&gt;fully supports Miracast&lt;/strong&gt;, including &lt;strong&gt;HDCP&lt;/strong&gt; (High-bandwidth Digital Content Protection), which is required for streaming protected content like Netflix or Hulu.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;5.2 Miracast: Available, no HDCP&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Your hardware supports Miracast, but does not support HDCP. This means you may not be able to stream DRM-protected content, but general screen mirroring should still work fine for most use cases (e.g., presentations, app demos, etc.).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;5.3 Miracast: Not Available&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Your PC’s hardware (either the graphics card, Wi-Fi adapter, or both) does not support Miracast. Unfortunately, you won’t be able to use Miracast features unless you upgrade or switch devices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;6. If Your Hardware Supports Miracast&lt;/p&gt;

&lt;p&gt;Open Command Prompt by right-clicking on it and selecting “Run as administrator.”&lt;/p&gt;

&lt;p&gt;7. Type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DISM /Online /Add-Capability /CapabilityName:App.WirelessDisplay.Connect~~~~0.0.1.0
&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.amazonaws.com%2Fuploads%2Farticles%2Fbtip9at4fhny160jaevu.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%2Fbtip9at4fhny160jaevu.png" alt="Type command load wireless display" width="800" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Windows will connect to the update servers and begin downloading the required components for Wireless Display.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🕐 This process may take a few minutes, and you'll see a progress percentage as it completes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once finished, your PC will be ready to act as a Miracast receiver using the built-in "Projecting to this PC" feature.&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%2F10nrdlvzu3eqt4lyi0md.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%2F10nrdlvzu3eqt4lyi0md.png" alt="Load Wireless Display" width="800" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8. Once the installation is complete, you should see a message indicating that the operation was successful.&lt;/p&gt;

&lt;p&gt;9. Restart your computer to finalize the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔌 Basic Usage: Getting Started with Miracast
&lt;/h2&gt;

&lt;p&gt;In this setup, we’ll use the Infrastructure Mode — meaning both devices are connected through an Access Point (AP) (e.g., your Wi-Fi router).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧰 Devices You’ll Need:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An Android smartphone with Wi-Fi turned on and connected to the AP&lt;/li&gt;
&lt;li&gt;A Windows PC (Windows 10 or newer) with Wi-Fi enabled and connected to the same AP&lt;/li&gt;
&lt;li&gt;Both devices must be connected to the same Wi-Fi network (same AP)
This allows them to discover each other and communicate over the local network using Miracast.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🖥️ Enabling Wireless Display on Windows (Receiver Mode)
&lt;/h2&gt;

&lt;p&gt;To allow your Windows PC to receive screen mirroring via Miracast:&lt;/p&gt;

&lt;p&gt;1. Go to Settings &amp;gt; System &amp;gt; Projecting to this PC&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%2Fsurjpxiihwu7xys4cryq.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%2Fsurjpxiihwu7xys4cryq.png" alt="Settings &amp;gt; System &amp;gt; Projecting to this PC" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Under “Some Windows and Android devices can project to this PC”, the default setting is “&lt;strong&gt;Always Off (Recommended)&lt;/strong&gt;” — this is for security purposes.&lt;/p&gt;

&lt;p&gt;To enable Miracast receiving, change it to either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Available everywhere" — for open access&lt;/li&gt;
&lt;li&gt;"Available everywhere on secure networks" — recommended if you're on a trusted Wi-Fi network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔑 Optionally adjust the following settings:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Require PIN for pairing&lt;br&gt;
Ask for permission every time a device tries to project&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;⚠️ Note:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Be cautious when enabling this feature, especially on public or shared networks. For most home users, “Available everywhere on secure networks” is a good balance of convenience and safety.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2F9lqfri0drqv2gq4oc6fg.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%2F9lqfri0drqv2gq4oc6fg.png" alt="Android devices can project to this PC" width="796" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📡 Start Receiving a Cast from Your Android Device
&lt;/h2&gt;

&lt;p&gt;To begin receiving a screen cast from your phone:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Search on your Windows taskbar&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.amazonaws.com%2Fuploads%2Farticles%2Fd82c5wnkkpyre4sl91f8.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%2Fd82c5wnkkpyre4sl91f8.png" alt="search wireless display" width="608" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Type "wireless display" and open the wireless display app (this is the Wireless Display receiver)&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.amazonaws.com%2Fuploads%2Farticles%2Ficra0bll3xph9qv55tkm.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%2Ficra0bll3xph9qv55tkm.png" alt="open wireless display app" width="800" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your PC will now be discoverable by your Android device when casting.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Make sure the Wireless Display feature is installed and enabled. If not, refer to the installation steps above.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;3. Open the “Wireless Display” app in Sink mode to wait for a cast from your mobile device.&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%2F6hqsta4h8yoijzzs5kiu.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%2F6hqsta4h8yoijzzs5kiu.png" alt="Wireless display sink mode" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Screen Casting from a Smartphone (Android)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Settings may vary by device. Use the following steps as a general guideline and adapt them to your own smartphone.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;1. Open the status menu (swipe down from the top of the screen) and tap on the Cast option.&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%2Fg1jvrzjxim5ttowbs16z.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.amazonaws.com%2Fuploads%2Farticles%2Fg1jvrzjxim5ttowbs16z.jpg" alt=" Open the status menu " width="180" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Tap this button to start casting from your phone.&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%2Fmo44rzsa6z6lxg1bkcsd.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.amazonaws.com%2Fuploads%2Farticles%2Fmo44rzsa6z6lxg1bkcsd.jpg" alt="casting from smartphone" width="225" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Tap the name of the PC or laptop you want to share your screen to.&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%2F7ysrr5xx360eaaubrsmu.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.amazonaws.com%2Fuploads%2Farticles%2F7ysrr5xx360eaaubrsmu.jpg" alt="Tab name for share screen" width="225" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After completing the steps on your Android phone and PC or laptop, you should see the following:&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%2F2u4z7jlvzcn4g0ztputf.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.amazonaws.com%2Fuploads%2Farticles%2F2u4z7jlvzcn4g0ztputf.jpg" alt="casting success" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔚 How to Stop Casting
&lt;/h2&gt;

&lt;p&gt;On your Android device, open the status menu and tap the Cast icon again to disconnect.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👉 &lt;em&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
In the Wireless Display window on your PC, move your mouse to the fullscreen icon (as shown in the image) to switch to fullscreen mode.&lt;br&gt;
To exit fullscreen, move your mouse to the edge of the screen — a control bar will appear (as shown). Click the exit fullscreen button.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2F595lbb2xtvku15spy740.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%2F595lbb2xtvku15spy740.png" alt="Exit full screen of wireless display" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔄 Additional Info&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want your computer to act as the source and cast its screen to a Smart TV or other wireless display:&lt;br&gt;
Go to &lt;em&gt;Settings &amp;gt; System &amp;gt; Display &amp;gt; Multiple displays &amp;gt; Connect to a wireless display,&lt;/em&gt;&lt;br&gt;
or simply press &lt;code&gt;Windows key + K.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;⚠️ Important: A computer cannot act as both a source and a sink at the same time. You must choose one role.&lt;/p&gt;
&lt;/blockquote&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%2Fshhwqxe0gy1p0kyyqxcx.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%2Fshhwqxe0gy1p0kyyqxcx.png" alt="PC share display " width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Miracast is a powerful yet often overlooked feature that lets you wirelessly share your screen without the need for third-party apps. Whether you're presenting, streaming, or just want a bigger display, setting it up takes just a few steps on supported devices.&lt;/p&gt;

&lt;p&gt;Give it a try — and enjoy the freedom of wireless screen sharing!&lt;/p&gt;

</description>
      <category>screencasting</category>
      <category>wifi</category>
      <category>android</category>
      <category>tech</category>
    </item>
    <item>
      <title>Git Full Speed Ahead Part 2: Organize Your Git Projects: Local Workflow Made Simple</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Tue, 22 Jul 2025 12:33:52 +0000</pubDate>
      <link>https://forem.com/pawic/git-full-speed-ahead-part-2-kickstarting-with-a-solid-local-git-workflow-5fce</link>
      <guid>https://forem.com/pawic/git-full-speed-ahead-part-2-kickstarting-with-a-solid-local-git-workflow-5fce</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;In this section, we’ll explore the typical local Git workflow — a series of commands and steps developers follow to manage code efficiently. Understanding the workflow helps you keep your project organized, track changes systematically, and collaborate smoothly with others (even when working solo!).&lt;/p&gt;

&lt;p&gt;Whether you're just getting started or brushing up on Git fundamentals, a solid grasp of this flow will lay the groundwork for everything to come.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GIT WORKFLOW&lt;/li&gt;
&lt;li&gt;GIT INIT&lt;/li&gt;
&lt;li&gt;GIT STATUS&lt;/li&gt;
&lt;li&gt;GIT ADD&lt;/li&gt;
&lt;li&gt;GIT RM -- CACHED&lt;/li&gt;
&lt;li&gt;GIT COMMIT&lt;/li&gt;
&lt;li&gt;GIT LOG&lt;/li&gt;
&lt;li&gt;GIT RESTORE&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  GIT WORKFLOW
&lt;/h2&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%2Ffvfgag0wnzo9wkvmtpeh.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%2Ffvfgag0wnzo9wkvmtpeh.png" alt="Git workflow" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What Happens When You Run a Git Command&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%2Fiqolzm031svjcgu131gn.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%2Fiqolzm031svjcgu131gn.png" alt="When You Run a Git Command" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Git Workflow Overview&lt;/strong&gt;&lt;br&gt;
Here’s a quick summary of the basic Git workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Working Directory&lt;/strong&gt;&lt;br&gt;
Start with a regular folder. Run &lt;code&gt;git init&lt;/code&gt; to begin tracking the project with Git.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Untracked Files&lt;/strong&gt;&lt;br&gt;
Git sees your files but doesn't track them yet. You need to run &lt;code&gt;git add&lt;/code&gt; to include them in version control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Staging (Tracked Files)&lt;/strong&gt;&lt;br&gt;
Files you add are moved to the staging area, where Git prepares them for a commit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Commit&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;git commit&lt;/code&gt; saves a snapshot of staged changes to your local repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Push to Remote&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;git push&lt;/code&gt; uploads your commits to a remote server — useful for backup or collaboration.&lt;/p&gt;



&lt;blockquote&gt;
&lt;p&gt;🧪💻 I ran the test using Git Bash, and I'm working on Windows.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🔥 GIT INIT
&lt;/h2&gt;

&lt;p&gt;When starting with Git for the first time in a project, this is the command you'll need:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This initializes a new Git repository in your current directory. It sets up the .git folder, allowing Git to begin tracking changes in your project.&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%2F9cwy3ff17ljsifo5rx1a.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%2F9cwy3ff17ljsifo5rx1a.png" alt="git init" width="468" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔥 GIT STATUS
&lt;/h2&gt;

&lt;p&gt;One of the most essential Git commands — git status helps you quickly and clearly see what’s going on in your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📌 What does git status do?&lt;/strong&gt;&lt;br&gt;
The git status command displays the current state of your Git repository. It shows you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Files that have been modified&lt;/li&gt;
&lt;li&gt;Changes that are not yet staged&lt;/li&gt;
&lt;li&gt;Files that are in the staging area (ready to commit)&lt;/li&gt;
&lt;li&gt;Untracked files — files that Git sees but isn't tracking yet&lt;/li&gt;
&lt;li&gt;The current branch name, and how it's related to the remote (e.g., ahead/behind)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s the first command you’ll often run before committing — like checking your dashboard before moving forward.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Example of git status command output&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%2F7idg22onwqwa8pv8qqa2.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%2F7idg22onwqwa8pv8qqa2.png" alt="git status command output" width="448" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔍 Breaking Down the git status Output&lt;/p&gt;

&lt;p&gt;1. &lt;strong&gt;On branch main&lt;/strong&gt;&lt;br&gt;
This tells you exactly which branch you’re currently working on — in this case, main. Knowing your branch keeps your workflow on track.&lt;/p&gt;

&lt;p&gt;2. &lt;strong&gt;Untracked files:&lt;/strong&gt;&lt;br&gt;
These are brand-new files Git has spotted but isn’t tracking yet. They’re not staged, so Git’s basically saying, “Hey, did you want me to watch these?”&lt;/p&gt;

&lt;p&gt;3. &lt;strong&gt;File names below this section&lt;/strong&gt;&lt;br&gt;
These are the actual files waiting in the wings — ready to be added to the staging area when you run git add.&lt;/p&gt;

&lt;p&gt;📂 &lt;strong&gt;File Statuses in Git (via git status)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;File Status&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;How to Handle&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Untracked&lt;/td&gt;
&lt;td&gt;New files not being tracked by Git&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git add &amp;lt;file&amp;gt;&lt;/code&gt; to start tracking them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tracked - Unmodified&lt;/td&gt;
&lt;td&gt;File is being tracked and hasn't changed since last commit&lt;/td&gt;
&lt;td&gt;✅ No action needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modified&lt;/td&gt;
&lt;td&gt;File has been changed but &lt;strong&gt;not yet staged&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git add &amp;lt;file&amp;gt;&lt;/code&gt; to stage, or &lt;code&gt;git restore &amp;lt;file&amp;gt;&lt;/code&gt; to discard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Staged (Index)&lt;/td&gt;
&lt;td&gt;Changes have been staged and are ready to be committed&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git commit&lt;/code&gt; to save the changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deleted (staged)&lt;/td&gt;
&lt;td&gt;A file has been deleted and the deletion has been staged&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git commit&lt;/code&gt; to record the deletion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deleted (unstaged)&lt;/td&gt;
&lt;td&gt;A file has been deleted but the deletion is not staged&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git add &amp;lt;file&amp;gt;&lt;/code&gt; to stage deletion or restore it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Renamed&lt;/td&gt;
&lt;td&gt;Git detects a file has been renamed (after staging)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git commit&lt;/code&gt; to save the rename&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conflicted&lt;/td&gt;
&lt;td&gt;Merge conflict: Git can't automatically merge changes&lt;/td&gt;
&lt;td&gt;Manually resolve, then &lt;code&gt;git add &amp;lt;file&amp;gt;&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ignored&lt;/td&gt;
&lt;td&gt;Files intentionally excluded via &lt;code&gt;.gitignore&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ No action needed (unless misconfigured)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;💡&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
The git status command is your go-to tool for checking what’s going on in your working directory. It shows which files have been modified, newly added, or are ready to commit. It’s an essential habit to run git status before every commit or push --helping you stay in control and avoid mistakes.&lt;/p&gt;
&lt;h2&gt;
  
  
  🔥 GIT ADD
&lt;/h2&gt;

&lt;p&gt;📌 What is git add?&lt;/p&gt;

&lt;p&gt;git add is the command used to move changes into the staging area, which is the step right before committing those changes into your Git repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✨The staging area is a temporary space where you collect the changes you intend to include in your next commit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;✅ Using git add&lt;/p&gt;

&lt;p&gt;To stage a specific file, 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 add &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This adds only the specified file to the staging area, preparing it to be committed.&lt;/p&gt;

&lt;p&gt;✅ To stage all changes (including new and modified files) in the current directory and its subdirectories, 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 add .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stages all changes in the current directory and its subdirectories — including new and modified files.&lt;/p&gt;

&lt;p&gt;✅ Use this to stage only files with a specific extension (e.g., .js, .txt, etc.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add *.&amp;lt;extension&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ To stage only tracked files — files that Git has seen before — 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 add -u
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The -u flag tells Git to update the index with changes to tracked files only (modified or deleted), skipping any new untracked files.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Examples of Using git add&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4syrcfyl3fg0t88o1v6.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%2Fl4syrcfyl3fg0t88o1v6.png" alt="Examples of Using git add" width="582" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔥 GIT RM --CACHED
&lt;/h2&gt;

&lt;p&gt;📌 What is git rm --cached?&lt;/p&gt;

&lt;p&gt;The git rm --cached command is used to remove a file from the staging area (also called the index) without deleting the file from your local machine. This means the file will no longer be included in the next commit, but it still physically exists in your project folder.&lt;/p&gt;

&lt;p&gt;✨ Use this when you want Git to stop tracking a file (untrack it), but you don’t want to actually delete the file.&lt;/p&gt;

&lt;p&gt;🧭 Command Syntax&lt;br&gt;
✅ This command removes a file from the staging area one at a time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rm --cached &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ You can use this command to remove an entire folder from the staging area:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rm --cached -r &amp;lt;foldername&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Unstage All Files and Folders from the Git Index&lt;br&gt;
The following command will unstage all files and folders in the current directory and all subdirectories from the Git index:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rm --cached -r .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;In summary: This command removes all tracked files—meaning it untracks everything under your project root.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This command removes all tracked files except those explicitly excluded via your .gitignore file.&lt;/p&gt;

&lt;p&gt;🧠 Why Use git rm --cached?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You accidentally added or committed files that should be ignored&lt;/li&gt;
&lt;li&gt;You want Git to stop tracking files without deleting them from your local disk&lt;/li&gt;
&lt;li&gt;To work with .gitignore so that files won’t be tracked in the future&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;⚠️ Caution&lt;/strong&gt;&lt;br&gt;
The files remain on your computer but are removed from Git tracking&lt;/p&gt;

&lt;p&gt;If you use git rm without --cached, the files will be deleted both from the staging area and your local machine!&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;git rm filename&lt;/td&gt;
&lt;td&gt;Removes the file from Git and deletes it locally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;git rm --cached file&lt;/td&gt;
&lt;td&gt;Removes the file from Git but keeps it on your disk&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example of using the git rm command&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%2F6rnolhhchqc8xn2aggiz.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%2F6rnolhhchqc8xn2aggiz.png" alt="git rm command" width="448" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Brief Explanation of How It Works&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When you run &lt;code&gt;git status&lt;/code&gt; for the first time, you will see that all files and folders have been added to the staging area.&lt;/li&gt;
&lt;li&gt;Use the command &lt;code&gt;git rm --cached -r dist/&lt;/code&gt; (&lt;strong&gt;important&lt;/strong&gt;: don’t forget the &lt;strong&gt;-r&lt;/strong&gt; !)&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;git status&lt;/code&gt; again, and you will notice the dist folder is now marked as Untracked.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  🔥 GIT COMMIT
&lt;/h2&gt;

&lt;p&gt;📌 What is git commit?&lt;/p&gt;

&lt;p&gt;The git commit command is one of the core Git commands used to save changes in your project to the repository. Git stores these changes as a "snapshot" of your files, allowing you to review or revert to them later.&lt;/p&gt;

&lt;p&gt;✅ Using git commit&lt;/p&gt;

&lt;p&gt;Before you can run git commit, you need to tell Git which files you want to include by using git add.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "Add a message describing the changes here"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the command git commit -m "Add a message describing the changes here" to create a commit with a message explaining your changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧠 Other Related Commands&lt;/strong&gt;&lt;br&gt;
Use this to commit all changes in tracked files without needing to run git add.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -a -m "message"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use git commit -a -m "message" to commit all changes to tracked files with a commit message, without needing to run git add first.&lt;/p&gt;

&lt;p&gt;example of git commit&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%2F7bzruf2hhkg5pa2avkcr.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.amazonaws.com%2Fuploads%2Farticles%2F7bzruf2hhkg5pa2avkcr.jpg" alt="git commit" width="421" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔥 GIT LOG
&lt;/h2&gt;

&lt;p&gt;📌 What is git log?&lt;/p&gt;

&lt;p&gt;The git log command is used to show the commit history of your repository. It displays important information about each commit, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit id (SHA-1 hash)&lt;/li&gt;
&lt;li&gt;Author name&lt;/li&gt;
&lt;li&gt;Commit date&lt;/li&gt;
&lt;li&gt;Commit message&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Using git log&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This command displays all commits, ordered from the most recent to the oldest.&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%2F2x4v1pihrvj5zeigs9ch.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%2F2x4v1pihrvj5zeigs9ch.png" alt="git log" width="469" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example of git log&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;commit 69c4808ce89cd63b55e3d01c862xxxxxx (HEAD -&amp;gt; main)
Author: Pawinphat &amp;lt;xyz@e-mail.com&amp;gt;
Date:   Tue Jul 22 13:47:43 2025 +0700

    Head 1 : Add all files and folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The commit ID is stored as a 40-character SHA-1 hash.&lt;/li&gt;
&lt;li&gt;The name of the person who made the commit.&lt;/li&gt;
&lt;li&gt;The date when the commit was made. &lt;/li&gt;
&lt;li&gt;The commit message.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Useful git log options&lt;/p&gt;

&lt;p&gt;Show commits in a concise (short) format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --oneline
&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.amazonaws.com%2Fuploads%2Farticles%2Fgjc2sk3rl75n22sxtzeg.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%2Fgjc2sk3rl75n22sxtzeg.png" alt="example git log --online" width="433" height="58"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Show history for a specific file&lt;br&gt;
Use this to see which commits have modified that file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log ABC.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-Show commits along with a branch structure graph&lt;/p&gt;

&lt;p&gt;This is useful for visualizing how branches diverge and when they were merged&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --graph --oneline --all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Display commits with a visual branch graph&lt;br&gt;
This view is useful for understanding how different branches split off from each other and when they were merged back in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --graph
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show commits of any user&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --author="name or email"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this command to show commit history filtered by author name or email.&lt;br&gt;
It's useful when you want to see only the commits made by a specific person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📌Additional Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;q&lt;/code&gt; to exit the git log output screen&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;git log -p&lt;/code&gt; to view detailed code changes for each commit&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;git log --since="2 weeks ago"&lt;/code&gt; to filter commits by a specific time range&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🔥 GIT RESTORE
&lt;/h2&gt;

&lt;p&gt;📌 What is git restore?&lt;/p&gt;

&lt;p&gt;git restore is a command used to safely and easily revert changes to files or restore them to a previous state.&lt;br&gt;
It was introduced in Git 2.23 as a safer and clearer alternative to certain uses of git checkout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💾 1. Discard changes to files (that haven't been added yet)&lt;/strong&gt;&lt;br&gt;
Use this when you’ve modified files but haven’t staged them, and want to undo the changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Revert the file back to its state in the latest commit.&lt;/li&gt;
&lt;li&gt;All changes in the file will be lost! (It’s not in staging and hasn’t been committed yet&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example&lt;br&gt;
1.1 If you accidentally delete &lt;code&gt;test.txt&lt;/code&gt;&lt;br&gt;
1.2 Then run &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3mym5housd9uja3smhy.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%2Fz3mym5housd9uja3smhy.png" alt="show git status" width="436" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.3 You’ll see that Git has detected the file &lt;code&gt;test.txt&lt;/code&gt; as deleted.&lt;br&gt;
1.4 When we run the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1.5 We will restore the file to its state before it was deleted.&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%2F8btc7g5z0gu24l8x7nus.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%2F8btc7g5z0gu24l8x7nus.png" alt="git restore" width="782" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.6 The system will restore the file to the state before it was deleted.&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%2F8a7rowu245zn8ioc1gms.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%2F8a7rowu245zn8ioc1gms.png" alt="restore the file to the state before it was deleted" width="429" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💾 2. Unstage files (that have already been added)&lt;/strong&gt;&lt;br&gt;
Use this when you’ve added files to the staging area by mistake and want to remove them from staging without losing your changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore --staged &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Removes the file from the staging area (similar to git reset filename.txt)&lt;br&gt;
but does not delete the actual changes made to the file.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore --staged main.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🎉 Now that you understand these basic commands—whether it's starting a project with git init, adding files to the staging area with git add, recording changes with git commit, or checking status and history with git status and git log—you've laid a solid foundation for working with Git at the local repository level.&lt;/p&gt;

&lt;p&gt;In the next chapter (Part 3), we'll build on this by exploring collaboration with others through remote repositories using commands like git push, git pull, and git clone, so you can manage projects smoothly with your team.&lt;/p&gt;




</description>
      <category>git</category>
      <category>programming</category>
      <category>github</category>
      <category>bash</category>
    </item>
    <item>
      <title>Git Full Speed Ahead Part 1: Installing Git on Windows and Getting Started in No Time</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Sat, 19 Jul 2025 06:59:36 +0000</pubDate>
      <link>https://forem.com/pawic/git-full-speed-ahead-part-1-installing-git-on-windows-and-getting-started-in-no-time-22ge</link>
      <guid>https://forem.com/pawic/git-full-speed-ahead-part-1-installing-git-on-windows-and-getting-started-in-no-time-22ge</guid>
      <description>&lt;p&gt;In today’s programming world, version control is essential — and Git has become a must-have tool for every developer.&lt;br&gt;
This article will walk you through a quick Git installation on Windows, so you can get up and running in no time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.🔧 The Starting Point: Why Do We Need Version Control?&lt;/strong&gt;&lt;br&gt;
When multiple developers work on the same codebase, problems often arise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who changed what?&lt;/li&gt;
&lt;li&gt;Which version is the most up-to-date?&lt;/li&gt;
&lt;li&gt;Accidentally deleted someone’s work — and can’t undo it!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 That’s why Version Control Systems (VCS) were created.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;2. 🧱 The Early Days: Centralized Version Control Systems (Centralized VCS)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The core idea: there’s a central server that stores all the code and its history.&lt;/li&gt;
&lt;li&gt;Developers must connect to this server to pull or push code.&lt;/li&gt;
&lt;li&gt;Think of it like a shared filing cabinet in an office — everyone has to take turns using it.&lt;/li&gt;
&lt;li&gt;Examples: SCCS, RCS, CVS, Subversion (SVN)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The downsides:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the server goes down, everyone is blocked.&lt;/li&gt;
&lt;li&gt;Offline work is nearly impossible.&lt;/li&gt;
&lt;li&gt;Merging code is slow and complicated.&lt;/li&gt;
&lt;li&gt;Branching is inconvenient and limited.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;3. 🌐 The Next Era: Distributed Version Control Systems (DVCS)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new concept: everyone has a full copy of the code and its history on their local machine.&lt;/li&gt;
&lt;li&gt;This enables offline work, smoother merges, and faster branching.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;4. 🚁 The Birth of Git&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Linux development team originally used BitKeeper (a VCS), but a licensing issue arose in 2005.&lt;/li&gt;
&lt;li&gt;As a result, Linus Torvalds created Git from scratch — in just a few weeks.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  😕 Many People Confuse Git with GitHub
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt; are not the same thing. Here's a quick breakdown:&lt;/p&gt;

&lt;p&gt;✅ Git is a version control tool that runs locally on your machine.&lt;/p&gt;

&lt;p&gt;✅ GitHub is an online platform where you can store, share, and collaborate on Git repositories with others.&lt;/p&gt;

&lt;p&gt;💡 So, How Is GitHub Different from Git?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Git&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A program that runs locally&lt;/td&gt;
&lt;td&gt;An online platform/website&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manages code versioning&lt;/td&gt;
&lt;td&gt;Used for storing, sharing, and collaboration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works offline&lt;/td&gt;
&lt;td&gt;Requires internet to sync&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can be used with services like GitLab, Bitbucket&lt;/td&gt;
&lt;td&gt;A service provided by GitHub only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  🎳Let’s Create a GitHub Account and Repository !
&lt;/h2&gt;

&lt;p&gt;1. Go to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
2. Create a repository or click on your profile&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%2F4ya6b9lrpejk34mfk64h.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%2F4ya6b9lrpejk34mfk64h.png" alt="Create a repository" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. After clicking "Your repositories", click "New" to create a new repository.&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%2Fq6z7lpt4iooeo1q7f9x7.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%2Fq6z7lpt4iooeo1q7f9x7.png" alt="Your repositorie" width="800" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Enter a name for your repository.&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%2Feayzbebslp55bk4sti02.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%2Feayzbebslp55bk4sti02.png" alt="Enter a name for your repository" width="624" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. Add a description and set the repository's visibility (public or private).&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%2Fx3g4ktymotg54c5n279f.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%2Fx3g4ktymotg54c5n279f.png" alt="Add a description" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5.1 Add a Description &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Description: This is a short explanation of what your project is about. It’s optional, but I highly recommend adding one — even a brief line helps you remember the project's purpose later.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;6. Repository Visibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public – Choose this if you want to share your code with others.&lt;/li&gt;
&lt;li&gt;Private – Choose this if it’s for personal use or not ready for public view.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;7.  Optional Files: You can also choose to initialize your repository with helpful files like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A README.md to describe your project in more detail.&lt;/li&gt;
&lt;li&gt;A .gitignore to specify which files Git should ignore.&lt;/li&gt;
&lt;li&gt;A license file, if you're open-sourcing your project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fro0yy60k013f28e13p3p.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%2Fro0yy60k013f28e13p3p.png" alt="Optional Files" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8. Once the repository is created, you’ll see a screen like this:&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%2Fzvew5ce83h0t572qdrmr.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%2Fzvew5ce83h0t572qdrmr.png" alt="repository is created" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📚Deleting a Repository
&lt;/h2&gt;

&lt;p&gt;To delete a repository:&lt;/p&gt;

&lt;p&gt;1. Go to your Profile &amp;gt; Your repositories&lt;/p&gt;

&lt;p&gt;2. Select the repository you want to delete&lt;/p&gt;

&lt;p&gt;3. Click on Settings in the selected repository&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%2F12x809br180pzm21nn6o.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%2F12x809br180pzm21nn6o.png" alt="selected repository for delete" width="800" height="109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Scroll down to the Danger Zone section and click Delete this repository&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%2Fmiujmt1i0tg6yg3eaa8w.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%2Fmiujmt1i0tg6yg3eaa8w.png" alt="Danger Zone " width="666" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. GitHub will ask you to confirm by typing the repository name into the box.&lt;br&gt;
Then, click Delete this repository to permanently remove it.&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%2F7v33svsn2noo5mgh36x4.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%2F7v33svsn2noo5mgh36x4.png" alt="delete repository" width="688" height="489"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🤾Let’s Start Using Git
&lt;/h2&gt;

&lt;p&gt;Installing Git&lt;br&gt;
1. Download the installer from &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;https://git-scm.com&lt;/a&gt; and click Download&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%2Fhpxkm76jpojrdnr4cztb.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%2Fhpxkm76jpojrdnr4cztb.png" alt="git scm" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Choose the operating system that matches your machine (I’m using Windows).&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%2Fznaosofq5hwyrajrd4bw.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%2Fznaosofq5hwyrajrd4bw.png" alt="download git scm" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Install Git (if there are no special options you want to change, just keep clicking Next — the default settings are good to go).&lt;/p&gt;

&lt;p&gt;4. Once the installation is complete, you’ll see a window like this:&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%2F3urqd2e8e7bwnky47zv6.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%2F3urqd2e8e7bwnky47zv6.png" alt="install git complete" width="401" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. After installation, open Git Bash. Here’s how:&lt;/p&gt;

&lt;p&gt;6. Type Git Bash in the search box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git bash .
&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.amazonaws.com%2Fuploads%2Farticles%2F4vgnlhuawp1lzq3c3ar7.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%2F4vgnlhuawp1lzq3c3ar7.png" alt="type git bash in search box" width="565" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7. To check if Git is installed and see which version you're using, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git --version
&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.amazonaws.com%2Fuploads%2Farticles%2Fezsj7c9e700olb7s5b6k.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%2Fezsj7c9e700olb7s5b6k.png" alt="check git version" width="731" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8. To check your current Git configuration, use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --list
&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.amazonaws.com%2Fuploads%2Farticles%2Fal6ypvmzx5124ww233qy.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%2Fal6ypvmzx5124ww233qy.png" alt="check config git" width="460" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9. Setting Your Email in Git&lt;/p&gt;

&lt;p&gt;To set your email in Git, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.email "you@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;10. Setting Your Name in Git&lt;/p&gt;

&lt;p&gt;To set your name in Git, use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "Your Name"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;11. When you run the git config --list command, you should see your configured email and username displayed in the list.&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%2Frcssa1u5osjz3vwliozt.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%2Frcssa1u5osjz3vwliozt.png" alt="git bash show config" width="478" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you’ve successfully installed Git and configured it — you're all set!&lt;br&gt;
🚀 In Part 2, we’ll dive into real Git commands like clone, commit, push, and pull to get you ready for real-world projects!&lt;/p&gt;




</description>
      <category>git</category>
      <category>programming</category>
      <category>github</category>
      <category>bash</category>
    </item>
    <item>
      <title>How to Supercharge Your ESP32 Projects with Gemini CLI (Step-by-Step)</title>
      <dc:creator>Pawinphat Charoenrat</dc:creator>
      <pubDate>Wed, 09 Jul 2025 09:53:25 +0000</pubDate>
      <link>https://forem.com/pawic/how-to-supercharge-your-esp32-projects-with-gemini-cli-step-by-step-4ebc</link>
      <guid>https://forem.com/pawic/how-to-supercharge-your-esp32-projects-with-gemini-cli-step-by-step-4ebc</guid>
      <description>

&lt;p&gt;👋&lt;strong&gt;Quick Introduction&lt;/strong&gt;&lt;br&gt;
Supercharge your ESP32 development with the power of AI!&lt;br&gt;
In this guide, you’ll learn how to use Google Gemini CLI as your coding companion for ESP-IDF projects inside Visual Studio Code. Whether you're writing C code, debugging tricky logic, or generating helpful docs—Gemini CLI brings real-time AI assistance right into your workflow.&lt;/p&gt;

&lt;p&gt;🔧 &lt;strong&gt;What You’ll Need&lt;/strong&gt;&lt;br&gt;
Here’s a quick checklist to get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An ESP32 board (e.g., Ai-Thinker or similar)&lt;/li&gt;
&lt;li&gt;A USB cable for connection&lt;/li&gt;
&lt;li&gt;A Windows PC&lt;/li&gt;
&lt;li&gt;Visual Studio Code with the ESP-IDF extension&lt;/li&gt;
&lt;li&gt;Basic familiarity with ESP-IDF&lt;/li&gt;
&lt;li&gt;An active internet connection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🧩 &lt;strong&gt;Step 1 – Installing Node.js&lt;/strong&gt;&lt;br&gt;
Before using Gemini CLI, you’ll need to have Node.js installed. We recommend version 18 or higher.&lt;/p&gt;

&lt;p&gt;To check if Node.js is already installed on your system,&lt;br&gt;
open PowerShell 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;node -v

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

&lt;/div&gt;



&lt;p&gt;example check nodejs&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkz78itn4vkr8yxi34qfb.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%2Fkz78itn4vkr8yxi34qfb.png" alt="Show command node-v" width="415" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you see a version number, you're good to go. If not, head over to &lt;a href="https://nodejs.org/en" rel="noopener noreferrer"&gt;nodejs.org&lt;/a&gt; and install the latest LTS version.&lt;/p&gt;

&lt;p&gt;🧩 &lt;strong&gt;Step 2 – Installing Gemini CLI&lt;/strong&gt;&lt;br&gt;
Once Node.js is set up, it’s time to install the Gemini CLI.&lt;/p&gt;

&lt;p&gt;Open PowerShell and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @google/gemini-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example install gemini cli&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7amm1am9d10qtzicyuxv.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%2F7amm1am9d10qtzicyuxv.png" alt="command gemini cli for install" width="800" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the installation finishes, the Gemini CLI is ready to go!&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%2Fceup2lrz4n5bplphknws.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.amazonaws.com%2Fuploads%2Farticles%2Fceup2lrz4n5bplphknws.jpg" alt="Gemini is installing " width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Step 3 – Running Gemini for the First Time&lt;/strong&gt;&lt;br&gt;
To launch Gemini CLI for the first time, simply run:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;example open gemini &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%2F2cfyaiby6yr3wp1bqc7k.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%2F2cfyaiby6yr3wp1bqc7k.png" alt="command open gemini" width="800" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the first launch, the system will prompt you to choose a theme for the CLI interface.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎨 &lt;em&gt;Don’t worry—you can change the theme later if you want. This is just for customizing the look and feel of your terminal experience.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2Ffpa2rp617qbih7rgvye2.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.amazonaws.com%2Fuploads%2Farticles%2Ffpa2rp617qbih7rgvye2.jpg" alt="Gemini theme" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After choosing your preferred theme, you’ll be prompted to sign in.&lt;/p&gt;

&lt;p&gt;By default, Gemini CLI uses Google Sign-In, so just follow the instructions to log in with your Google account.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔐 &lt;em&gt;This step is required so Gemini CLI can access the Gemini API on your behalf.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fkjf920fq59qeb0kqcci4.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.amazonaws.com%2Fuploads%2Farticles%2Fkjf920fq59qeb0kqcci4.jpg" alt="gemini sign in" width="720" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you're signed in, you're ready to start chatting with Gemini right from your terminal!&lt;/p&gt;

&lt;p&gt;✅ And that’s it—Gemini CLI is now ready to use!&lt;/p&gt;

&lt;p&gt;You can start using AI to help with your ESP32 development right inside your terminal. Ask it to write code, explain functions, fix bugs, or even translate text—it’s like having a coding assistant built into your workflow.&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%2Faneyehaojm6rx9urny7i.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%2Faneyehaojm6rx9urny7i.png" alt="gemini ready" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩Step 4 – Running a Build: Command vs AI Prompt&lt;/strong&gt;&lt;br&gt;
Traditionally, you would build your ESP32 project using the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;idf.py build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But with Gemini CLI, you can simply type a natural language prompt like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 “Build my ESP-IDF project”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Gemini understands what you mean and helps generate or run the correct command—saving you time and minimizing context switching between docs and terminals.&lt;/p&gt;

&lt;p&gt;You can go beyond just building. Try asking Gemini to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Flash this project to my ESP32 board.”&lt;br&gt;
 “Clean and rebuild my ESP-IDF project.”&lt;br&gt;
 “Why am I getting a CMake error when I build?”&lt;br&gt;
 “Suggest compiler flags for faster build.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s like having a smart assistant who knows both ESP-IDF and your codebase—right there in your terminal.&lt;/p&gt;

&lt;p&gt;Example ESP-IDF Build&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjf8eam5wsj93mdipc35.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%2Fnjf8eam5wsj93mdipc35.png" alt="Build in Vscode and ESP-IDF" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Step 5 – Using Gemini CLI Inside the ESP-IDF Terminal in VS Code&lt;/strong&gt;&lt;br&gt;
Now let’s try using Gemini CLI directly inside the ESP-IDF environment within Visual Studio Code.&lt;/p&gt;

&lt;p&gt;To do this, open the dedicated ESP-IDF terminal by pressing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ctrl + Shift + P → then select&lt;/li&gt;
&lt;li&gt;ESP-IDF: Open ESP-IDF Terminal&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.amazonaws.com%2Fuploads%2Farticles%2F3rjigsk5zg7188z2cjur.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.amazonaws.com%2Fuploads%2Farticles%2F3rjigsk5zg7188z2cjur.jpg" alt="Open Terminal" width="679" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives you a pre-configured terminal with all the necessary environment variables set up—perfect for running ESP-IDF commands or interacting with Gemini CLI.&lt;/p&gt;

&lt;p&gt;Once the ESP-IDF terminal is open, just type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gemini
&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.amazonaws.com%2Fuploads%2Farticles%2Fgzv2pj202ewbxlvp5jzw.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%2Fgzv2pj202ewbxlvp5jzw.png" alt="Open gemini in vscode with ESP-IDF" width="800" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will launch the Gemini CLI right inside your dev environment—ready to take your prompts and help you out in real time.&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%2Fhddsx3rmwlax2hehuo9m.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%2Fhddsx3rmwlax2hehuo9m.png" alt="gemini ready" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I gave Gemini a simple prompt to try building my project.&lt;br&gt;
Here’s an example of what I typed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ฺฺBuild ESP-IDF Project
&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.amazonaws.com%2Fuploads%2Farticles%2F1iyo87wxelo9lfyxk9ga.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%2F1iyo87wxelo9lfyxk9ga.png" alt="prompt for gemini" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gemini will then ask for confirmation to start the build.&lt;br&gt;
Just press Enter to continue.&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%2Fy0dmn882x493653aoza6.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%2Fy0dmn882x493653aoza6.png" alt="Gemini confirmation" width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ If everything goes smoothly, Gemini will confirm that the build finished successfully—no issues at all.&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%2Fsejuakvotbu0b4vv69xe.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%2Fsejuakvotbu0b4vv69xe.png" alt="Gemini build success" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀&lt;strong&gt;I Tried Using Gemini CLI to Catch Bugs in My ESP32 Code—Here’s What Happened&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I deliberately wrote some incorrect code to test Gemini.&lt;/p&gt;

&lt;p&gt;For example, I changed this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ESP_LOGI(TAG_Fade, "Initial state: LED is OFF.");

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

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ex(TAG_Fade, "Initial state: LED is OFF.");

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

&lt;/div&gt;



&lt;p&gt;Next, I asked Gemini to build the project for me.&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%2Fyw8600n32m5dy1qjw1x3.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.amazonaws.com%2Fuploads%2Farticles%2Fyw8600n32m5dy1qjw1x3.jpg" alt="test gemini" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gemini notified me that the build failed and showed the error.&lt;br&gt;
It then asked if I wanted it to fix the issue.&lt;/p&gt;

&lt;p&gt;I just pressed Enter to let Gemini handle the fix.&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%2Fn5bz36zcitj35scnl0o5.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%2Fn5bz36zcitj35scnl0o5.png" alt="gemini notified" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gemini showed me the lines it fixed and asked if I wanted to build the project again.&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%2Foi2ptjk3k6ftz039rc0z.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%2Foi2ptjk3k6ftz039rc0z.png" alt="Gemini build again" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I built the project again after Gemini’s fixes, everything went through smoothly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;☢️ &lt;em&gt;A quick heads-up:&lt;br&gt;
When Gemini asks if you want to fix an error, choose “yes, allow once”—especially if you’re not sure how many errors your project has.&lt;br&gt;
Try to avoid selecting “yes, allow always”, because Gemini will then automatically fix issues without asking again. Sometimes, it might apply incorrect fixes since you didn’t have a chance to review them first. This can lead to unexpected problems or even cause your project to fail.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>gemini</category>
      <category>vscode</category>
      <category>esp32</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
