← Back to list

How to Reset and Change Your Git Account on Windows

If you’ve been using Git on Windows and need to switch to a different account or simply reset your credentials, this guide will walk you…

Barış Gündüz · 2025-01-21 16:39 · 0 claps · 2.2 min read paywalled
#git #github #git-credentials #git-credential-manager #git-reset
Open on Medium ↗
Wiki topics: 🔓 · Open Source

How to Reset and Change Your Git Account on Windows

https://github.blog/security/application-security/git-credential-manager-authentication-for-everyone/

https://github.blog/security/application-security/git-credential-manager-authentication-for-everyone/

If you’ve been using Git on Windows and need to switch to a different account or simply reset your credentials, this guide will walk you through the process step by step. Whether you want to use a new **GitHub** or GitLab account, these instructions will help you clear out any stored credentials and set up your new ones without hassle.

1. Remove Old Credentials from Windows

Windows keeps track of your Git credentials in the Credential Manager. To remove or reset them:

  1. Open the Control Panel Go to your Start menu, open Control Panel, then select User Accounts.
  2. Access the Credential Manager Within User Accounts, locate Credential Manager and click on it.
  3. Find and Remove Git Credentials In the Windows Credentials or Web Credentials section, look for any entries related to your Git or GitHub/GitLab account. Typically, you’ll see something like git:https://github.com or similar. Remove those entries to clear your old account details.

This action ensures Windows no longer has any cached credentials for your previous Git account.

2. Update Your Git Configuration

2.1. Change the Global Username and Email

Next, open Git Bash or your terminal and update your global Git configuration:

git config --global user.name "Your New Username"
git config --global user.email "yournewemail@example.com"

From now on, all your commits will reflect these new details.

2.2. Set Up the Credential Helper

On Windows, Git typically uses the Git Credential Manager to store account details. To ensure it’s in use, run:

git config --global credential.helper manager

When you push to a remote repository (e.g., GitHub or GitLab), Git will prompt you for your new username and password (or personal access token). Once you enter them, the Credential Manager will store those credentials for future use.

3. Sign In with Your New Account

Finally, go to a local Git repository in your terminal or Git Bash and perform an action that requires authentication — for example:

git push

This will trigger a login prompt where you can enter the username and password or personal access token for your new Git account. Once you’ve successfully authenticated, Windows will remember these credentials in the Credential Manager.

Summary

  1. Remove Old Credentials Open the Windows Credential Manager and delete any Git or GitHub/GitLab entries.
  2. Update Git Config Change your global username and email using the git config --global commands.
  3. Push to Your Repository Attempt a push (or any Git action requiring credentials). You’ll be prompted for the new account details, which will then be stored automatically.

With these steps, you’ll have successfully reset and switched your Git account on Windows. From this point on, all your commits and pushes will use the new credentials you configured.

You can support me by creating Digitalocean account with my referral link. Or **buy me a coffee from link below. Thank you ❤**

https://buymeacoffee.com/barisgunduz

https://buymeacoffee.com/barisgunduz


메타데이터
post_id
b66219cbbbb3
slug
how-to-reset-and-change-your-git-account-on-windows-b66219cbbbb3
url
https://medium.com/@barisgunduz/how-to-reset-and-change-your-git-account-on-windows-b66219cbbbb3
canonical_url
https://medium.com/@barisgunduz/how-to-reset-and-change-your-git-account-on-windows-b66219cbbbb3
author_url
https://medium.com/@barisgunduz
status
ok
fetched_at
2026-07-30 09:18:59