git常用命令:添加、修改、刪除以及查看本地的用戶名和郵箱

原文鏈接:https://blog.csdn.net/huangxinglian/article/details/90694361

1.添加

$ git config --global user.name "yourName"
$ git config --global user.email "[email protected]"


2.修改

(1)覆蓋的形式:

$ git config --global user.name "yourName"
$ git config --global user.email "[email protected]"


(2)替換的形式:

$  git config --global --replace-all user.name "yourName" 
$  git config --global --replace-all user.email "[email protected]"


3.刪除

$ git config --global --unset user.name "yourName"
$ git config --global --unset user.email "[email protected]"


4.查看

(1)查看所有:

$ git config --list


(2)查看指定信息:

$ git config user.name
$ git config user.email


————————————————
版權聲明:本文爲CSDN博主「x_apricot」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/huangxinglian/article/details/90694361

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章