如何从本地计算机上删除git帐户并添加新帐户 [英] How to remove git account from local machine and add new account

查看:72
本文介绍了如何从本地计算机上删除git帐户并添加新帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在我的Windows pc中配置的github帐户.现在,我已经创建了一个新的Github帐户,并希望使用该新帐户.

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.

我如何从Windows PC中删除旧帐户并添加新的github帐户?

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

注意::我已经编辑了gitconfig文件,并在其中添加了新的用户电子邮件和用户名.但是公共密钥仍然包含旧用户电子邮件!

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 !!

推荐答案

对于Windows计算机

您可以为此目的管理Windows凭据

转到搜索按钮,然后写

管理Windows凭据

然后您将找到一个按钮双击

then you will find a button double click it

然后删除您当前的Windows凭据

之后,当您再次使用git时,将要求 git身份验证

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

然后您将输入新的 github id

下一步,您需要编辑.gitconfig文件

文件路径将类似于

C:\Users\Imu

此处 imu 是我的用户名你们的情况会有所不同

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

现在使用具有当前ID信息的 nodepad ++ 崇高文本之类的文本编辑器编辑 .gitconfig 文件

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

希望有帮助

这篇关于如何从本地计算机上删除git帐户并添加新帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆