<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Himanshu</title>
    <description>The latest articles on DEV Community by Himanshu (@himanshu_fb2e29b6b2f52338).</description>
    <link>https://dev.to/himanshu_fb2e29b6b2f52338</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%2F2220543%2F6acac9c3-6b70-43d8-8134-5a00ea2befb5.jpg</url>
      <title>DEV Community: Himanshu</title>
      <link>https://dev.to/himanshu_fb2e29b6b2f52338</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himanshu_fb2e29b6b2f52338"/>
    <language>en</language>
    <item>
      <title>Fixing Performance of My React App — Step 1: Measuring What’s Slow</title>
      <dc:creator>Himanshu</dc:creator>
      <pubDate>Sat, 19 Jul 2025 11:00:25 +0000</pubDate>
      <link>https://dev.to/himanshu_fb2e29b6b2f52338/fixing-performance-of-my-react-app-step-1-measuring-whats-slow-46kk</link>
      <guid>https://dev.to/himanshu_fb2e29b6b2f52338/fixing-performance-of-my-react-app-step-1-measuring-whats-slow-46kk</guid>
      <description>&lt;h2&gt;
  
  
  Part 1: Measuring LCP &amp;amp; Latency — Where’s My React App Slow?
&lt;/h2&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; If your React app feels slow, two key metrics to check are &lt;strong&gt;Latency&lt;/strong&gt; and &lt;strong&gt;Largest Contentful Paint (LCP)&lt;/strong&gt;. In this post, I’ll show you how to measure them using tools like Lighthouse, Chrome DevTools, and GTmetrix.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;As developers, we love to create software with our ideas that come to mind. &lt;br&gt;
That's how we work, right? Many times, we focus so much on optimising code : using the best algorithms, scalable libraries, or modern technologies, that we forget something critical: actual runtime performance.&lt;/p&gt;

&lt;p&gt;Have you ever wondered, despite doing so much, your website is loads slow, it takes seconds as compared to others, which took a few milliseconds. &lt;/p&gt;

&lt;p&gt;When I notice that a lot of questions came into my head, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do they do something extraordinary?&lt;/li&gt;
&lt;li&gt;Do they know more than I?&lt;/li&gt;
&lt;li&gt;Do they use some advanced techniques or libraries?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I researched it with my portfolio website and came up with two major issues: Latency and LCP. What are they? Let me explain to you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency -:&lt;/strong&gt; It’s the time a website takes for a user’s action (like clicking a link) to result in a response (like the server starting to send data).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Think of it as:&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How long do I wait before the website starts responding after I do something?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Types of latency in web:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Network latency – Time taken for data to travel from browser to server and back.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server latency – Time taken the server takes to process and respond.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Input latency – Delay between a user’s interaction and the browser’s response.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;LCP (Largest Contentful Paint) -:&lt;/strong&gt; LCP measures the time it takes for the largest visible element (like an image or text block) to appear on the screen after a page starts loading.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In simple words:&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How fast can the user see the main content of the page?&lt;br&gt;
It reflects how quickly the user feels the page is useful, not just loaded, but visually complete.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Now you have a question about how to measure this, right?&lt;/strong&gt;&lt;br&gt;
Ideal LCP value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Good: Less than 2.5 seconds&lt;/li&gt;
&lt;li&gt;Needs Improvement: Between 2.5s and 4s&lt;/li&gt;
&lt;li&gt;Poor: More than 4s&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to Measure Latency:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lighthouse (in Chrome DevTools):&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Open DevTools → Go to Lighthouse tab.&lt;/li&gt;
&lt;li&gt;Run an audit (mobile/desktop).&lt;/li&gt;
&lt;li&gt;You’ll get metrics like:

&lt;ul&gt;
&lt;li&gt;Time to First Byte (TTFB) (indicates server latency)&lt;/li&gt;
&lt;li&gt;First Input Delay (FID) (interaction latency)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

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

&lt;ol&gt;
&lt;li&gt;WebPageTest.org:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://www.webpagetest.org" rel="noopener noreferrer"&gt;https://www.webpagetest.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Enter your URL and run a test.&lt;/li&gt;
&lt;li&gt;It will show detailed latency breakdowns, including TTFB, DNS time, and more.&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%2Fwbu1ymx81vc0q12dsf58.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%2Fwbu1ymx81vc0q12dsf58.png" alt="Webpagetest" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Measure LCP (Largest Contentful Paint) :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Google Lighthouse (DevTools or PageSpeed Insights):&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Open Chrome → DevTools → Lighthouse tab → Run audit.
               &lt;em&gt;OR&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;Go to PageSpeed Insights&lt;/li&gt;
&lt;li&gt;Enter your URL&lt;/li&gt;
&lt;li&gt;You’ll get the LCP time and suggestions to improve it.&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%2Fa0lsemy7ayg6gx9uhv7w.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%2Fa0lsemy7ayg6gx9uhv7w.png" alt="LCP Using Lighthouse" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Chrome DevTools → Performance Tab:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open DevTools → Go to the Performance tab.&lt;/li&gt;
&lt;li&gt;Click the Record button (top-left circle), then reload the page.&lt;/li&gt;
&lt;li&gt;Stop recording after the page loads.&lt;/li&gt;
&lt;li&gt;Hover over the LCP marker in the timeline to see what element was the LCP and how long it took.&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%2Fho0r976yxikl6ci7tptr.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%2Fho0r976yxikl6ci7tptr.png" alt="LCP Using Performance tab" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don't want to do all this or Found this complex you can use a web tool called &lt;strong&gt;GTmetrix&lt;/strong&gt;. GTmetrix is a great tool to measure both latency and LCP, along with many other web performance metrics. It’s beginner-friendly and free for basic use.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Steps -:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://gtmetrix.com/" rel="noopener noreferrer"&gt;GTmetrix.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Enter your website URL in the input box.&lt;/li&gt;
&lt;li&gt;Click on "Test your site" (you can create a free account to choose test location and browser).&lt;/li&gt;
&lt;li&gt;Wait for the analysis to complete — takes 15–30 seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;What GTmetrix Shows:&lt;/em&gt;&lt;br&gt;
 1.Under the "Performance" tab:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LCP (Largest Contentful Paint):&lt;/li&gt;
&lt;li&gt;Directly listed with a time (e.g., 1.8s)&lt;/li&gt;
&lt;li&gt;Click on it to see what element caused the LCP.

&lt;ol&gt;
&lt;li&gt;Under the "Timings" tab:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Time to First Byte (TTFB):

&lt;ul&gt;
&lt;li&gt;    Indicates server latency&lt;/li&gt;
&lt;li&gt;    A high TTFB means your server is slow to respond.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  Other useful timings:

&lt;ul&gt;
&lt;li&gt;    First Contentful Paint (FCP)&lt;/li&gt;
&lt;li&gt;    DOMContentLoaded&lt;/li&gt;
&lt;li&gt;    Fully Loaded Time
&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%2Fdepw1lwzonqftvlr5mel.png" alt="GT metrix performance" width="800" height="450"&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%2Fmd5l7w6uh1ga5257bp0c.png" alt="GT metrix performance" width="800" height="450"&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%2F3jwscrin816ybi5psek4.png" alt="GT metrix performance" width="800" height="450"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Fixing performance issues like Latency and LCP starts with one simple thing: &lt;em&gt;knowing what’s slow and what the causes are&lt;/em&gt;.&lt;br&gt;
In this post, I shared how I investigated these two metrics in my React app and what tools helped me uncover the problems.&lt;/p&gt;

&lt;p&gt;Whether you're working on a portfolio or a full-scale product, understanding how to measure performance is the first real step to improving it.&lt;/p&gt;

&lt;p&gt;This was &lt;strong&gt;Part 1&lt;/strong&gt;, where I focused on identifying the performance bottlenecks — specifically &lt;strong&gt;Latency&lt;/strong&gt; and &lt;strong&gt;Largest Contentful Paint (LCP)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 2&lt;/strong&gt;, I’ll share the actual &lt;strong&gt;fixes&lt;/strong&gt; that helped improve my metrics — from lazy loading, image optimization, to React-specific tweaks that made a real difference.&lt;/p&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>react</category>
      <category>performance</category>
    </item>
    <item>
      <title>🎉 𝗚𝗶𝘁 𝗖𝗵𝗲𝗮𝘁 𝗦𝗵𝗲𝗲𝘁 𝗳𝗼𝗿 𝗛𝗮𝗰𝗸𝘁𝗼𝗯𝗲𝗿𝗳𝗲𝘀𝘁 2024! 🎉</title>
      <dc:creator>Himanshu</dc:creator>
      <pubDate>Wed, 16 Oct 2024 15:01:13 +0000</pubDate>
      <link>https://dev.to/himanshu_fb2e29b6b2f52338/2024-h4m</link>
      <guid>https://dev.to/himanshu_fb2e29b6b2f52338/2024-h4m</guid>
      <description>&lt;p&gt;Hacktoberfest is in full swing, and whether you’re a &lt;code&gt;Git&lt;/code&gt; newbie or a seasoned contributor, we all know managing your Git workflow can be tricky sometimes. But don’t worry—I’ve got your back!&lt;/p&gt;

&lt;p&gt;💡 Here’s a handy Git Cheat Sheet to make your open-source contributions smoother and faster. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Git Configuration
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- Set Your Name and Email&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 config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Set the Default Branch Name&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 config --global init.defaultBranch master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Many developers are switching to &lt;code&gt;main&lt;/code&gt; as the default branch name, but &lt;code&gt;master&lt;/code&gt;, &lt;code&gt;trunk&lt;/code&gt;, or develop are also common options.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Set the Default Pull Policy to Rebase&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 config --global pull.rebase true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Enable Auto-Stashing During Rebase&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 config --global rebase.autoStash true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This automatically &lt;code&gt;stashes&lt;/code&gt; local changes during a rebase and re-applies them afterward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Set Push Behavior to the Current Branch&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 config --global push.default current
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will ensure that &lt;code&gt;git push&lt;/code&gt; only pushes the current branch.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Basic Git Workflow
&lt;/h2&gt;

&lt;p&gt;These are the fundamental Git commands you'll use for everyday repository management:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Cloning a Repository&lt;/strong&gt;&lt;br&gt;
To copy a remote repository to your local machine:&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;You can find the repository URL on the GitHub or GitLab page of the repository you want to clone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Check Repository Status&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check the current state of your working directory:&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;This shows which files have changes, which are &lt;code&gt;staged&lt;/code&gt;, and which are ready for &lt;code&gt;commit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Adding Changes&lt;/strong&gt;&lt;br&gt;
Stage changes by adding files to 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 add &amp;lt;file-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's generally best to avoid using &lt;code&gt;git add .&lt;/code&gt; to stage everything, as it's more precise to add specific files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Commit Changes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After staging changes, commit them with a meaningful message:&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 "Your commit message"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For tips on writing effective commit messages, check out Ten Commandments of Git Commit Messages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Viewing Commit History&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To see a log of your commits:&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;For a simpler, one-line summary of each commit:&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;strong&gt;- Push Changes to Remote&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Send your committed changes to the &lt;code&gt;remote&lt;/code&gt; 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
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Branching and Merging
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Branching&lt;/code&gt; allows you to work on different features or bug fixes independently. Here’s how to handle branches effectively:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Create a New Branch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To create and switch to 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 switch -c &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, if you just want to create the branch without switching:&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;&lt;strong&gt;- Switch to Another Branch&lt;/strong&gt;&lt;br&gt;
To change to a different 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 switch &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- List All Branches&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;View all branches in your 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 branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Merge a Branch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Integrate changes from another &lt;code&gt;branch&lt;/code&gt; into your &lt;code&gt;current branch&lt;/code&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 merge &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Delete a Branch&lt;/strong&gt;&lt;br&gt;
Once a &lt;code&gt;branch&lt;/code&gt; is no longer needed, you can remove it:&lt;/p&gt;

&lt;p&gt;Locally:&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;Remotely:&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 origin --delete &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Stashing Changes
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Stashing&lt;/code&gt; is useful for temporarily saving changes that you don’t want to &lt;code&gt;commit&lt;/code&gt; yet:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Save Changes to a Stash&lt;/strong&gt;&lt;br&gt;
If you need to switch &lt;code&gt;branches&lt;/code&gt; but aren’t ready to &lt;code&gt;commit&lt;/code&gt; your 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 stash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Apply Stash&lt;/strong&gt;&lt;br&gt;
To reapply the &lt;code&gt;stashed&lt;/code&gt; changes later:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- List Stashed Changes&lt;/strong&gt;&lt;br&gt;
If you have multiple &lt;code&gt;stashes&lt;/code&gt;, view them with:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;By following these tips and using the commands effectively, you can manage your Git workflow more efficiently and keep your repository clean and organized. Happy coding! 🚀&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/R0LEX7" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;a href="https://www.linkedin.com/in/himanshu-kumar-gola/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &lt;a href="https://himanshu-kumar-gola.vercel.app/" rel="noopener noreferrer"&gt;Portfolio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
