Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove git account from local machine and add new account

Tags:

I have a github account which is configured in my windows pc. Now I have created a new Github account and want to use the new one.

How will I remove my old account from my windows pc and add the new github account ?

NOTE: I have edited the gitconfig file and added the new user email and username there. But the public key still contains the old user email !!

like image 230
Ebrahim Khalilullah Avatar asked Apr 23 '17 16:04

Ebrahim Khalilullah


2 Answers

For windows machine

you can manage windows credential for doing this

go to search button then write

manage windows credential

then you will find a button double click it

then remove your current windows credential

after that when you are using git again git authentication will be asked

then you will enter your new github id

Next you need to edit .gitconfig file

file path will be like

C:\Users\Imu 

here imu is my user name it will be different in yours

Now edit .gitconfig file using text editor like nodepad++ or sublime text with ur current id information

hoping it helps

like image 164
SHAH MD IMRAN HOSSAIN Avatar answered Oct 07 '22 13:10

SHAH MD IMRAN HOSSAIN


You can use Credential Manager for adding/deleting/modifying existing Github accounts. Steps:

  1. Go to Start -> Type 'Credential Manager' -> Open Credential Manager
  2. Below window will be displayed

enter image description here

  1. Go to 'Windows Credentials' -> Generic Credentials
  2. You will see an entry for Github

enter image description here

  1. Click on the entry -> You will see below options

enter image description here

  1. You can edit the entry -> Add new username and password -> Click on Save

enter image description here

Hope this helps!

like image 26
Atul Avatar answered Oct 07 '22 12:10

Atul