<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Shubham Kumar]]></title><description><![CDATA[Web Dev & Software Engineer | Driven by Knowledge]]></description><link>https://shubhamkumar01.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 18:13:27 GMT</lastBuildDate><atom:link href="https://shubhamkumar01.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Use Two Git Accounts (Work + Personal) on One Laptop — A Simple Copy-Paste Setup]]></title><description><![CDATA[As a developer, I use two Git identities:

Personal GitHub account

Office / company Git account


At first this caused a lot of small problems.
Sometimes I would commit to a personal project and late]]></description><link>https://shubhamkumar01.hashnode.dev/how-i-use-two-git-accounts-work-personal-on-one-laptop-a-simple-copy-paste-setup</link><guid isPermaLink="true">https://shubhamkumar01.hashnode.dev/how-i-use-two-git-accounts-work-personal-on-one-laptop-a-simple-copy-paste-setup</guid><category><![CDATA[Git #GitHub #DevTips #Developer]]></category><dc:creator><![CDATA[shubham kumar]]></dc:creator><pubDate>Mon, 09 Mar 2026 07:28:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6413f26940f526b62562fa61/7590e6a4-d325-4d09-8f1b-0637fca02171.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a developer, I use <strong>two Git identities</strong>:</p>
<ul>
<li><p>Personal GitHub account</p>
</li>
<li><p>Office / company Git account</p>
</li>
</ul>
<p>At first this caused a lot of small problems.</p>
<p>Sometimes I would commit to a <strong>personal project</strong> and later notice that the commit author was my <strong>office email</strong>.</p>
<p>Other times a company repository showed my <strong>personal email</strong> in the commit history.</p>
<p>This happens because Git uses the <strong>same global identity everywhere</strong> unless we configure it differently.</p>
<p>So I created a clean setup where Git <strong>automatically switches identity depending on the folder</strong>.</p>
<p>The result:</p>
<p>✔ No manual switching<br />✔ No wrong commit emails<br />✔ Clean project organization<br />✔ Works automatically</p>
<p>This guide shows the <strong>exact setup you can copy-paste and use</strong>.</p>
<hr />
<h1>The Idea</h1>
<p>We will organize projects like this:</p>
<pre><code class="language-plaintext">~/workspace
   ├── personal
   └── work
</code></pre>
<p>Git behavior:</p>
<table>
<thead>
<tr>
<th>Folder</th>
<th>Git Identity</th>
</tr>
</thead>
<tbody><tr>
<td><code>~/workspace/personal</code></td>
<td>Personal account</td>
</tr>
<tr>
<td><code>~/workspace/work</code></td>
<td>Work account</td>
</tr>
<tr>
<td>Any other folder</td>
<td>Work account (default)</td>
</tr>
</tbody></table>
<p>This way Git automatically chooses the correct identity.</p>
<hr />
<h1>Step 1 — Create Workspace Folders</h1>
<p>Run this:</p>
<pre><code class="language-bash">mkdir -p ~/workspace/personal
mkdir -p ~/workspace/work
</code></pre>
<p>Your structure becomes:</p>
<pre><code class="language-plaintext">workspace
 ├── personal
 └── work
</code></pre>
<hr />
<h1>Step 2 — Create Personal Git Config</h1>
<p>Create a separate Git config file for your personal identity.</p>
<pre><code class="language-plaintext">nano ~/.gitconfig-personal
</code></pre>
<p>Paste:</p>
<pre><code class="language-plaintext">[user]
    name = YOUR_PERSONAL_NAME
    email = YOUR_PERSONAL_EMAIL
</code></pre>
<p>Example:</p>
<pre><code class="language-plaintext">[user]
    name = shubham-01-star
    email = skshubham8348@gmail.com
</code></pre>
<p>Save and exit.</p>
<hr />
<h1>Step 3 — Configure Global Git (Work Identity)</h1>
<p>Now open the main Git config:</p>
<pre><code class="language-plaintext">nano ~/.gitconfig
</code></pre>
<p>Replace contents with this:</p>
<pre><code class="language-plaintext">[user]
    name = YOUR_WORK_NAME
    email = YOUR_WORK_EMAIL

[includeIf "gitdir:~/workspace/personal/"]
    path = ~/.gitconfig-personal

[init]
    defaultBranch = main
</code></pre>
<p>Example real configuration:</p>
<pre><code class="language-plaintext">[user]
    name = shubham-kumar-01-dev
    email = shubham.kumar@company.com

[includeIf "gitdir:~/workspace/personal/"]
    path = ~/.gitconfig-personal

[init]
    defaultBranch = main
</code></pre>
<p>Explanation:</p>
<ul>
<li><p>Global Git identity = <strong>work account</strong></p>
</li>
<li><p>If repo is inside <strong>personal folder</strong>, Git loads <code>.gitconfig-personal</code>.</p>
</li>
</ul>
<hr />
<h1>Step 4 — Test the Setup</h1>
<h3>Personal Folder Test</h3>
<pre><code class="language-plaintext">cd ~/workspace/personal
mkdir git-test-personal
cd git-test-personal
git init
</code></pre>
<p>Check identity:</p>
<pre><code class="language-plaintext">git config user.email
</code></pre>
<p>Expected:</p>
<pre><code class="language-plaintext">your_personal_email
</code></pre>
<hr />
<h3>Work Folder Test</h3>
<pre><code class="language-plaintext">cd ~/workspace/work
mkdir git-test-work
cd git-test-work
git init
</code></pre>
<p>Check:</p>
<pre><code class="language-plaintext">git config user.email
</code></pre>
<p>Expected:</p>
<pre><code class="language-plaintext">your_work_email
</code></pre>
<hr />
<h1>Step 5 — Test With a Commit</h1>
<pre><code class="language-plaintext">echo "test" &gt; test.txt
git add .
git commit -m "testing git identity"
</code></pre>
<p>Check commit author:</p>
<pre><code class="language-plaintext">git log
</code></pre>
<hr />
<h1>Useful Debug Command</h1>
<p>If something looks wrong, run:</p>
<pre><code class="language-plaintext">git config --list --show-origin
</code></pre>
<p>This shows <strong>which config file is providing each value</strong>.</p>
<hr />
<h1>Optional: Terminal Shortcuts for Faster Navigation</h1>
<p>While working I noticed I was typing long commands like:</p>
<pre><code class="language-plaintext">cd ~/workspace/personal
</code></pre>
<p>again and again.</p>
<p>So I created two shortcuts:</p>
<ul>
<li><p><code>personal</code> → jumps to personal workspace</p>
</li>
<li><p><code>work</code> → jumps to work workspace</p>
</li>
</ul>
<hr />
<h2>Create the Shortcuts</h2>
<p>Open your shell config:</p>
<pre><code class="language-plaintext">nano ~/.bashrc
</code></pre>
<p>Add these lines at the bottom:</p>
<pre><code class="language-plaintext">alias personal="cd ~/workspace/personal"
alias work="cd ~/workspace/work"
</code></pre>
<p>Save the file.</p>
<p>Now reload the terminal configuration:</p>
<pre><code class="language-plaintext">source ~/.bashrc
</code></pre>
<hr />
<h2>How to Use the Shortcuts</h2>
<p>Now you can instantly jump to your folders.</p>
<p>Go to personal workspace:</p>
<pre><code class="language-plaintext">personal
</code></pre>
<p>Go to work workspace:</p>
<pre><code class="language-plaintext">work
</code></pre>
<p>Instead of typing long <code>cd</code> commands every time.</p>
<p>This small trick makes the workflow much faster.</p>
<hr />
<h1>Daily Workflow</h1>
<h3>Personal Projects</h3>
<pre><code class="language-plaintext">personal
git clone https://github.com/username/project.git
</code></pre>
<p>Commits will use <strong>personal identity</strong>.</p>
<hr />
<h3>Work Projects</h3>
<pre><code class="language-plaintext">work
git clone &lt;company-repository&gt;
</code></pre>
<p>Commits will use <strong>work identity</strong>.</p>
<hr />
<h1>Final Workspace Structure</h1>
<p>Your projects will eventually look like this:</p>
<pre><code class="language-plaintext">~/workspace
   ├── personal
   │      ├── portfolio
   │      ├── open-source-tool
   │      └── side-project
   │
   └── work
          ├── backend-api
          ├── auth-service
          └── internal-dashboard
</code></pre>
<p>Git automatically chooses the correct identity.</p>
<hr />
<h1>Final Thoughts</h1>
<p>Managing multiple Git identities can be frustrating at first.</p>
<p>But once you combine:</p>
<ul>
<li><p>Folder organization</p>
</li>
<li><p>Conditional Git configs</p>
</li>
<li><p>Small terminal shortcuts</p>
</li>
</ul>
<p>your workflow becomes <strong>clean, safe, and automatic</strong>.</p>
<p>You never have to worry about committing with the wrong account again.</p>
<p>And that’s exactly how good developer tooling should work.  </p>
<p>#Git #GitHub #DevTips #Developer</p>
]]></content:encoded></item><item><title><![CDATA[React Project: Password Manager]]></title><description><![CDATA[STEP*::- 1 setup for development*
open folder
then run cmd on the folder path "

run all these commands one by one
1. npm create vite@latest
2 cd <filename>
step up the project look like this :







3. npm i
4. code .  (for open vs code) now close ...]]></description><link>https://shubhamkumar01.hashnode.dev/react-project-password-manager</link><guid isPermaLink="true">https://shubhamkumar01.hashnode.dev/react-project-password-manager</guid><dc:creator><![CDATA[shubham kumar]]></dc:creator><pubDate>Sun, 26 May 2024 06:03:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/npxXWgQ33ZQ/upload/06549160f39f6ae06d7a3446dfe332e8.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-step-1-setup-for-development">STEP*::- 1 setup for development*</h2>
<p><em>open folder</em></p>
<p><em>then run cmd on the folder path "</em></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3pyt_J8MxrYsScZqhDciio7CkTZF7we1XVL0COW4-QZz5_g6eMU3Pj0MX-bolXGvKh-itLVDgPL1Yn5tBXTL_EwbpK-Q64A7rAWAJifPTL5fnYUBDMwvsFbGZxaE70Er-kLBxlhBJdqyiouW9m1tgiOp0-MpQRgo6Lp_Qk7nC_Fx_G1VoQfgIq7aTAwuw/w440-h89/Screenshot%202024-05-22%20010610.png" alt /></p>
<p><em>run all these commands one by one</em></p>
<p><em>1. npm create vite@latest</em></p>
<p><em>2 cd &lt;filename&gt;</em></p>
<p><em>step up the project look like this :</em></p>
<blockquote>
<blockquote>
<blockquote>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkiMaIDa9vmByiUCBuRdPuMs1mAqxtME5IpMWvpT_aWWBPTKX-hgbbsddCAFMLyjXfXtF0bbOdVOYnaqFMDDQnBTUgdrkusJYiD2TC2Pki-zMKvBQ5hn2eDQXwwnSwcYwKYlKV-fcOIjoPJl3s01A2cBgdajSq50fADJ-4ezRtrP36wzbewIPSe0zELO_P/w475-h288/Screenshot%202024-05-22%20011002.png" alt /></p>
</blockquote>
</blockquote>
</blockquote>
<p><em>3. npm i</em></p>
<p><em>4. code .  (for open vs code) now close the cmd</em></p>
<p><em>now we run all commands in the vs code terminal</em></p>
<ol>
<li><p><em>npm run dev (we see the basic counter app and open that in the browser)</em></p>
<p> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_kXFMn88KuEo6_33AibkzDYmLqJXgpwr-3IG9pdtRO-SQTd0QraKd8n8pfv8Tb4pNVfSWX1D7b9ognXIaxFo2nScxIuElirOC5Nkywf_uG4dCsb176MnXNAwEfWEs_hfy4v9GlR93ZitVpHSlMG8QUJ6xpEdWnxsUcGUc8wyCBm-1qQFAUc5GPrjKkA0Z/w517-h294/Screenshot%202024-05-22%20011806.png" alt /></p>
<p> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjWH9oYWhbGvV9mxYFBFqACsm2mATxEZg08Z8KHqka4wKRMk-OGLhsLUj9eAIU1JBzk8ox3OgoSDJonPZ_1tYpKkKeXx405by6IVczKgYidRUBTYPDqVWwMFoDL35cGEDtuMq-eyUgW4BafPkdZeqh67_XEuJcBTad0cpbW2jwRx14sQo6rX0kzfGHqm5/w515-h333/Screenshot%202024-05-22%20012002.png" alt /></p>
</li>
</ol>
<p>2. Open File Explorer then go to src--&gt; app.jsx and clear the pre-UI now</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdiEYdl6_qYqW-4ZsTNaSUu2NQrMzzC3RbIO51y89TGN7nVupKLFDzqSCuZaTgvJxZfK4uO7qm1nfZQdmEvwSiHSN7Ns-k3Et9ekRgS7hbPZuun64MxUIx88bmiAlJnqnFaF_Ly-G0TmARzyO6-q6oj8cyco9nRV7BaCDLn2_cEwKQU_9RZd3NgC-Vj7Ki/s320/Screenshot%202024-05-22%20012745.png" alt /></p>
<p>4. now we install tailwind CSS</p>
<p>and step all according to our needs like we install tailwind for Vite</p>
<p>read this::-  https://tailwindcss.com/docs/guides/vite</p>
<p>we use this website for the background color: https://bg.ibelick.com/</p>
<h3 id="heading-now-i-start-the-development"><strong>now I start the development</strong></h3>
<p>1. src--&gt; components --&gt; Navbar.jsx created ,</p>
<p>src--&gt; components--&gt; Manager.jsx</p>
]]></content:encoded></item></channel></rss>