如何修改git显示的用户名
仅有的幸福
仅有的幸福 2017-05-02 09:18:22
0
4
746

如图,我使用:

    $git config --global user.email "tanteng@gmail.com"
    $git config --global user.name "tanteng"

想修改显示的用户名,却不能实现。请问如何修改呢?
ps:这台机子是以前别人使用的,现在我接手,想把绿色显示用户名的地方改成我的。

仅有的幸福
仅有的幸福

reply all(4)
Peter_Zhu

The username displayed in green is the login account and has nothing to do with git.

What you need is the control panel, thank you. Click to change the account name and that’s it

阿神

This has nothing to do with git, you need to check the bash prompt

Ty80

It seems that the questioner is using git on win. If you use some tools such as TortoiseGit, you can have an intuitive understanding of these problems first.

These operations are mapped into commands as @nightire said.

滿天的星座

When

--global 是设置全局的(当前用户的全局)属性,也就是说当你的 repo 没有设置项目的 user.nameuser.email is used, this will be used by default. (For example, when you create a new repo)

If you find that it doesn't work, nine times out of ten it's because the repo you are in has already set up a local one user.name user.email, so the global one is not used.

How do I know if there are local settings? git config --local --list Take a look.
How to set local properties? git config user.name/email.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template