How to Logout from Git in windows | Git logout in windows

By Ved Prakash N | Jul 24, 2025 | General Posts
Share :

https://www.fundaofwebit.com/post/how-to-logout-from-git-in-windows-git-logout-in-windows

How to Logout and Re-Setup Git Credentials on Windows (Command Line Guide)

If you're switching Git accounts or need to reset your credentials on Windows, follow these step-by-step instructions to logout and reconfigure Git:


βœ… Step 1: Clear Existing Git Credentials

  1. Open Command Prompt or PowerShell

  2. Clear cached credentials (if any):

git credential-cache exit
  1. If you're using Git Credential Manager (default in Git for Windows), run:

git credential-manager clear
  1. Alternatively, manually remove credentials via Windows Credential Manager:

    • Open the Start menu and search for "Credential Manager".

    • Go to the "Windows Credentials" tab.

    • Look for entries like https://github.com and remove them.


πŸ‘€ Step 2: Reconfigure Git Global Username & Email

Set your Git identity globally using the following commands:

git config --global user.name "Your Name" git config --global user.email "your.email@example.com"

πŸ” Step 3: Reauthenticate with the Remote Repository

When you next interact with a remote (clone, pull, or push), Git will prompt you to log in again.

For example:

git clone https://github.com/<username>/<repository>.git

πŸ›‘ Important: GitHub no longer supports password authentication via HTTPS. Use a Personal Access Token (PAT) instead of your password when prompted.


βœ… Step 4: Verify Git Configuration

Run the following to verify your setup:

git config --list

You should see your correct username, email, and credential helper listed.


πŸš€ Step 5: Clone the Repository Again

Example:

git clone https://github.com/b2bsmarter/multitenant-frontend.git

Git will prompt you to log in via GitHub. Choose your preferred method (browser login, token, etc.) to authenticate.


πŸŽ‰ That’s it!

You’ve now successfully logged out and reset your Git credentials on Windows. Next time you push or pull, Git will use the new authentication.

https://www.fundaofwebit.com/post/how-to-logout-from-git-in-windows-git-logout-in-windows

Share this blog on social platforms