litmmp

应用情景:使用Git前需要配置 user.name 和 user.email 信息。Git利用这些信息记录谁进行了什么样的操作。Git属于分布式版本管理系统,开发者很多,配置这个就相当于自报家门,告诉别人我是谁,所以需要有意义的配置信息。

 

1、安装Git,步骤不再叙述。

2、配置全局 user.name 和 user.email,全局配置作用于本地Git管理的所有项目:

git config --global user.name "xxx"
git config --global user.email "xxx@163.com"

3、如果不想使用全局配置或是某个项目需要单独配置 user.name 和 user.email:

git config user.name "xxx"
git config user.email "xxx@163.com"

4、查看Git配置信息,包括全局配置和项目当前配置,二者都有的情况下,Git优先使用项目当前配置(就是3中的配置):

git config --list

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-10-16
  • 2021-09-11
  • 2022-01-22
  • 2021-10-28
猜你喜欢
  • 2021-11-05
  • 2021-05-24
  • 2021-07-10
  • 2021-04-25
  • 2021-08-03
  • 2021-09-07
  • 2021-08-11
相关资源
相似解决方案