如何在Windows上更改Git Bash的用户名和主机名?

4
我该如何在git bash中更改用户名和主机名? enter image description here

可能是重复的问题:更改Git用户名 - Misa Lazovic
这个设置是在 .bashrc.bash_profile.profile 中的 PS1 中定制的。 - Dut A.
3个回答

1

这段代码片段并没有解决问题。那只是Git配置,有点不相关。 - Dut A.

0

你有三种可能性:

  1. 全局更改该属性:

    git config --system user.name "user5148540"

  2. 在 Windows 用户级别上进行更改:

    git config --global user.name "user5148540"

  3. 仓库(项目级别)级别:只针对一个项目:

    git config user.name "user5148540"


-1
  • 对于主机名,从PC的系统属性更改计算机名称。
  • 对于用户名,请更改您登录的帐户名。

  • 网页内容由stack overflow 提供, 点击上面的
    可以查看英文原文,
    原文链接