【发布时间】:2016-03-03 16:01:15
【问题描述】:
【问题讨论】:
-
该设置在
PS1.bashrc或.bash_profile或.profile中自定义
【问题讨论】:
PS1.bashrc或.bash_profile或.profile中自定义
在 git 中设置用户名:
# set the user name as global (user level) configuration
git config --global user.name "user name"
要更改 bash 提示,请阅读这些答案:
Where exactly Git Bash for Windows' prompt is defined?
Alter Git prompt on Windows
基本问题是您必须像在 Unix 中那样创建用户配置文件。在寡妇中,它将被放置在%PROGRAMFILES%\Git\etc\profile 下,您将在那里设置PS1 环境变量。
【讨论】:
你有三个可能性:
该属性的系统范围更改:
git config --system user.name "user5148540"
Windows 用户级别的更改
git config --global user.name "user5148540"
存储库(项目级别)级别:仅适用于项目:
git config user.name "user5148540"
【讨论】:
【讨论】: