學習Git(一)

Git下載地址:

https://git-scm.com/downloads

Git學習手冊地址:

https://git-scm.com/book/zh/v2

查看所有配置:

$ git config --list --show-origin

安裝完Git首先要設置名字和郵箱(每次的提交都會用到這些信息):

$ git config --global user.name "John Doe"

$ git config --global user.email [email protected]

設置代碼編輯器的方法:

$ git config --global core.editor emacs

或者

$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

檢查 Git 的某一項配置

語法: git config <key>

檢查名字

$ git config user.name

查找Git 命令的綜合手冊

快速查找簡明的 “help” :

$ git add -h

語法

$ git help <verb>

$ git <verb> --help

$ man git-<verb>

例子:$ git help config

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