使用git时我们需要配置一下自己的基本信息,如:user.name、user.email等。下面是基本的增删改查。
全局
//查
git config --global --list
git config --global user.name
//增
git config --global --add user.name my_name
//删
git config --global --unset user.name
//改
git config --global user.name my_name
本地
//查
git config --list
git config user.name
//增
git config --add user.name my_name
//删
git config --unset user.name
//改
git config user.name my_name
配置文件中所有key:
user.name
user.email
...