Git安裝
-
首先進入root模式
-
在安裝新軟件包之前,應該始終更新一下apt軟件包索引:
apt-get update
-
安裝Git
apt-get install git
Git配置
-
現在已經安裝了Git,建議設置Git提交電子郵件和用戶名:
git config --global user.name "Your Name" git config --global user.email "[email protected]"
-
可以使用以下命令驗證配置內容:
git config --list 輸出結果: user.name=Your Name [email protected]
下載Github中倉庫源代碼
使用如下所示命令:其中倉庫地址可以點擊上圖所示的Clone or download按鈕,即可得到地址,命令行中的mydir是選擇的存放源代碼的路徑
git clone git://git.kernel.org/pub/scm/.../linux.git mydir