[英]How to change username and hostname for git bash on Windows?
To set up user name in git: 要在git中设置用户名:
# set the user name as global (user level) configuration
git config --global user.name "user name"
To change the bash prompt read those answers: 要更改bash提示,请阅读以下答案:
Where exactly Git Bash for Windows' prompt is defined? 究竟是哪里定义了Git Bash for Windows'提示符?
Alter Git prompt on Windows 在Windows上更改Git提示
The basic issue is the you will have to create user profile file like you do in Unix. 基本问题是您必须像在Unix中一样创建用户配置文件。 In widows it will be placed under
%PROGRAMFILES%\\Git\\etc\\profile
and you will set the PS1
environment variable there. 在寡妇中,它将被置于
%PROGRAMFILES%\\Git\\etc\\profile
,您将在那里设置PS1
环境变量。
you have thre posibilities: 你有可能性:
Systemwide change of that properties: 系统范围内的属性更改:
git config --system user.name "user5148540"
git config --system user.name“user5148540”
changes on Windows user level Windows用户级别的更改
git config --global user.name "user5148540"
git config --global user.name“user5148540”
Repository (Projekt Level) Level: for just a Projekt: 存储库(Projekt级别)级别:仅用于Projekt:
git config user.name "user5148540"
git config user.name“user5148540”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.