在IntelliJ IDEA中更改Git用户 [英] Change Git user in IntelliJ IDEA

查看:1533
本文介绍了在IntelliJ IDEA中更改Git用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的IntelliJ IDEA被另一个用户使用,当我尝试推送到Git时,系统询问我该用户的密码.

My IntelliJ IDEA was used by another user and when I try to push to Git, I was asked a password of this user.

如何在我的IDEA中更改用户?我试图更改全局Git用户,但无法正常工作.

How can I change user in my IDEA? I tried to change global Git user, but it is not working.

推荐答案

  1. 转到项目的基本目录.

  1. Go to the base directory of your project.

您将找到一个名为".git"的隐藏目录.输入它.

You will find a hidden directory called ".git". Enter into it.

在那里您将看到一个名为"config"的文件.添加以下代码.

There you will see a file called "config". Add the below code.

[user]
      name = username
      email = username@domain.com

这篇关于在IntelliJ IDEA中更改Git用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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