<?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: Deepika Gunda</title>
    <description>The latest articles on DEV Community by Deepika Gunda (@deepikagunda).</description>
    <link>https://dev.to/deepikagunda</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%2F143300%2F10713cc7-fd58-4b8e-9999-0718848987a9.jpeg</url>
      <title>DEV Community: Deepika Gunda</title>
      <link>https://dev.to/deepikagunda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deepikagunda"/>
    <language>en</language>
    <item>
      <title>Managing Multiple Git Identities on Windows for Different Projects</title>
      <dc:creator>Deepika Gunda</dc:creator>
      <pubDate>Fri, 08 Nov 2024 06:20:43 +0000</pubDate>
      <link>https://dev.to/deepikagunda/managing-multiple-git-identities-on-windows-for-different-projects-fc1</link>
      <guid>https://dev.to/deepikagunda/managing-multiple-git-identities-on-windows-for-different-projects-fc1</guid>
      <description>&lt;p&gt;Are you juggling multiple Git accounts for work, personal projects, or freelancing gigs? Managing multiple identities on Git can be a hassle, but with the right setup, Windows can handle it seamlessly. Imagine switching from work to personal projects without ever having to manually update your Git or SSH credentials again! Let’s dive in and set up Git to automatically choose the right identity based on the folder.&lt;/p&gt;

&lt;p&gt;This guide will cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring Git with different identities based on folder paths&lt;/li&gt;
&lt;li&gt;Setting up SSH for automatic key selection&lt;/li&gt;
&lt;li&gt;Enabling &lt;code&gt;ssh-agent&lt;/code&gt; to auto-load on Windows startup&lt;/li&gt;
&lt;li&gt;Basic Git operations and confirming your setup with &lt;code&gt;git config&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So let’s get started.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Configure Git for Multiple Identities
&lt;/h2&gt;

&lt;p&gt;The first step is to make Git aware of different identities based on the project folder.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open your global Git configuration file&lt;/strong&gt; (&lt;code&gt;.gitconfig&lt;/code&gt;), located at &lt;code&gt;C:\Users\YourUsername\.gitconfig&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the following lines&lt;/strong&gt; to define a default work identity and set a conditional include for personal projects:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   [user]
       name = "Your Work Username"
       email = "work@example.com"

   [includeIf "gitdir/i:C:/work/personal/"]
       path = C:/Users/YourUsername/.gitconfig-personal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a new Git configuration file&lt;/strong&gt; at &lt;code&gt;C:\Users\YourUsername\.gitconfig-personal&lt;/code&gt; for personal projects:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   [user]
       name = "Your Personal Username"
       email = "personal@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, Git will use the global identity for all repositories except those under &lt;code&gt;C:\work\personal&lt;/code&gt;, where it will automatically use your personal credentials.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Set Up SSH for Automatic Key Selection
&lt;/h2&gt;

&lt;p&gt;To keep things seamless, let’s set up SSH to use different keys based on the Git account without needing to change each repository’s remote URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open or create your SSH &lt;code&gt;config&lt;/code&gt; file&lt;/strong&gt; at &lt;code&gt;C:\Users\YourUsername\.ssh\config&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the following entries&lt;/strong&gt; to specify which SSH key to use based on the Git host:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   # Default GitHub account (for work or general use)
   Host github.com
       HostName github.com
       User git
       IdentityFile C:/Users/YourUsername/.ssh/id_rsa  # Work SSH key path

   # Alias for personal GitHub account
   Host github-personal
       HostName github.com
       User git
       IdentityFile C:/Users/YourUsername/.ssh/id_rsa_personal  # Personal SSH key path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This SSH config setup allows Git to automatically select the correct key when accessing each account. No need to modify each repository's remote URL manually!&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Enable &lt;code&gt;ssh-agent&lt;/code&gt; to Auto-Load on Startup
&lt;/h2&gt;

&lt;p&gt;To save yourself from repeatedly adding SSH keys, let’s configure &lt;code&gt;ssh-agent&lt;/code&gt; to automatically load your keys each time you log in.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enable the SSH agent service to start on boot&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open PowerShell as an Administrator and run:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Get-Service ssh-agent | Set-Service -StartupType Automatic
 Start-Service ssh-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Automatically add keys on login&lt;/strong&gt;:&lt;/p&gt;
&lt;h1&gt;
  
  
  Setting Up a Scheduled Task to Run &lt;code&gt;ssh-add&lt;/code&gt; on Login
&lt;/h1&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open Task Scheduler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Task Scheduler from the Start menu or press &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;taskschd.msc&lt;/code&gt;, and press Enter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a New Task:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In Task Scheduler, select &lt;strong&gt;Action &amp;gt; Create Task&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure the Task:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Under the &lt;strong&gt;General&lt;/strong&gt; tab, name the task (e.g., “Add SSH Key to Agent”).&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;Run only when user is logged on&lt;/strong&gt; and &lt;strong&gt;Run with highest privileges&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Trigger the Task:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;Triggers&lt;/strong&gt; tab and click &lt;strong&gt;New&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the trigger to &lt;strong&gt;Begin the task: At log on&lt;/strong&gt; and ensure it’s set for &lt;strong&gt;Any user&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add Action to Run &lt;code&gt;ssh-add&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;Actions&lt;/strong&gt; tab and click &lt;strong&gt;New&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Action&lt;/strong&gt; to &lt;strong&gt;Start a Program&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For the &lt;strong&gt;Program/script&lt;/strong&gt; field, enter the path to &lt;code&gt;ssh-add&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; C:\Windows\System32\OpenSSH\ssh-add.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;strong&gt;Add arguments&lt;/strong&gt; field, specify the paths to your SSH private keys:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; -Command "ssh-add C:/Users/YourUsername/.ssh/id_rsa; ssh-add C:/Users/YourUsername/.ssh/id_rsa_personal"
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Save the Task:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to save the task.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, every time you start Windows, &lt;code&gt;ssh-agent&lt;/code&gt; will be up and running with your keys loaded.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Testing the Setup with Basic Git Operations
&lt;/h2&gt;

&lt;p&gt;Let’s test the setup and see how Git will behave differently depending on your folder location.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Git Operations
&lt;/h3&gt;

&lt;p&gt;In the terminal, try the following commands to confirm everything is working as expected:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to your work project&lt;/strong&gt; (&lt;code&gt;C:\work\project&lt;/code&gt;):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   git config user.name  # Should show your work username
   git config user.email  # Should show your work email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to a personal project&lt;/strong&gt; (&lt;code&gt;C:\work\personal\my-project&lt;/code&gt;):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   git config user.name  # Should show your personal username
   git config user.email  # Should show your personal email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run Git commands&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   git status  # Check the current branch and changes
   git commit -m "A sample commit"  # Confirm your identity in commit logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 5: Confirming the Git Configuration with &lt;code&gt;git config --list&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;To get a full list of the active configuration in each context, use &lt;code&gt;git config --list --show-origin&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This command will display all configurations, including which file (global, included, or local) each setting comes from.&lt;/li&gt;
&lt;li&gt;It’s a useful way to confirm that your setup is working as expected in each directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, run this in &lt;code&gt;C:\work\personal\my-project&lt;/code&gt; to confirm the personal configuration is loaded, then try it again in &lt;code&gt;C:\work\project&lt;/code&gt; to see the work configuration.&lt;/p&gt;




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

&lt;p&gt;With this setup, you’re ready to manage multiple Git identities on Windows without constantly switching configurations or updating SSH keys manually. By setting up Git and SSH configs this way, you’ve made it easy to separate work and personal projects with minimal hassle.&lt;/p&gt;

&lt;p&gt;Happy coding, and may your Git journeys be smooth and productive! Let me know in the comments if you have questions or any cool tips on managing multiple identities in Git.&lt;/p&gt;

</description>
      <category>git</category>
      <category>pcsetup</category>
      <category>developer</category>
      <category>ssh</category>
    </item>
    <item>
      <title>How to Fix Lenovo Thinkpad X1 Extreme Gen freezing without blue screen</title>
      <dc:creator>Deepika Gunda</dc:creator>
      <pubDate>Thu, 07 Nov 2024 11:28:30 +0000</pubDate>
      <link>https://dev.to/deepikagunda/reverting-to-locally-stored-windows-image-work-3jjh</link>
      <guid>https://dev.to/deepikagunda/reverting-to-locally-stored-windows-image-work-3jjh</guid>
      <description>&lt;p&gt;Recently, my Lenovo Thinkpad X1 Extreme Gen 4 started acting up. It would randomly freeze—sometimes after 10 minutes, sometimes after 30. When it did, the cursor stopped moving, and the fan was completely silent. It was eerie. There were no blue screens or warning sounds, so it didn’t seem like a typical CPU or RAM issue. I was puzzled. What could it be?&lt;/p&gt;

&lt;h3&gt;
  
  
  Troubleshooting Steps
&lt;/h3&gt;

&lt;p&gt;I tried several things to fix it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checked for malware:&lt;/strong&gt; I ran Malwarebytes, and it found nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ran Windows scans:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sfc /scannow – No issues here.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DISM (dism /online /cleanup-image /restorehealth) – All clear.&lt;/p&gt;

&lt;p&gt;Cleaned temp files and disabled startup apps to clear any potential clutter.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hardware scans:&lt;/strong&gt; I used Lenovo’s Commercial Vantage tool to scan hardware, which showed no issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stress tests:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OCCT tool – One crash during the CPU + RAM test.&lt;/li&gt;
&lt;li&gt;Intel Processor Diagnostic Tool – Passed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still, my laptop kept freezing. I noticed some WHEA errors in the Event Viewer logs, but the error details weren’t helpful—they were just code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Event Viewer Efficiently&lt;/strong&gt;&lt;br&gt;
To make checking logs easier, I created a custom filter in Event Viewer. Each time the laptop froze, I’d do a hard restart and check these filtered logs to save time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Steps&lt;/strong&gt;&lt;br&gt;
Checked for crash dumps in C:\Users&amp;lt;user&amp;gt;\AppData\Local\CrashDumps. I found couple of entries that were named WTabletServiceISD.exe . This was Wacom service exe , I do not need it. I disabled the Wacom service in services.msc. Now, it’s running smoothly and is usable again.&lt;/p&gt;

</description>
      <category>windows</category>
      <category>intel</category>
      <category>restore</category>
      <category>os</category>
    </item>
  </channel>
</rss>
